public function MockObjectComparatorTest::assertEqualsFailsProvider in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/sebastian/comparator/tests/MockObjectComparatorTest.php \SebastianBergmann\Comparator\MockObjectComparatorTest::assertEqualsFailsProvider()
File
- vendor/
sebastian/ comparator/ tests/ MockObjectComparatorTest.php, line 76
Class
- MockObjectComparatorTest
- @coversDefaultClass SebastianBergmann\Comparator\MockObjectComparator
Namespace
SebastianBergmann\ComparatorCode
public function assertEqualsFailsProvider() {
$typeMessage = 'is not instance of expected class';
$equalMessage = 'Failed asserting that two objects are equal.';
// cyclic dependencies
$book1 = $this
->getMock('SebastianBergmann\\Comparator\\Book', null);
$book1->author = $this
->getMock('SebastianBergmann\\Comparator\\Author', null, array(
'Terry Pratchett',
));
$book1->author->books[] = $book1;
$book2 = $this
->getMock('SebastianBergmann\\Comparator\\Book', null);
$book2->author = $this
->getMock('SebastianBergmann\\Comparator\\Author', null, array(
'Terry Pratch',
));
$book2->author->books[] = $book2;
$book3 = $this
->getMock('SebastianBergmann\\Comparator\\Book', null);
$book3->author = 'Terry Pratchett';
$book4 = $this
->getMock('stdClass');
$book4->author = 'Terry Pratchett';
$object1 = $this
->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(
4,
8,
15,
));
$object2 = $this
->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(
16,
23,
42,
));
return array(
array(
$this
->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(
4,
8,
15,
)),
$this
->getMock('SebastianBergmann\\Comparator\\SampleClass', null, array(
16,
23,
42,
)),
$equalMessage,
),
array(
$object1,
$object2,
$equalMessage,
),
array(
$book1,
$book2,
$equalMessage,
),
array(
$book3,
$book4,
$typeMessage,
),
array(
$this
->getMock('SebastianBergmann\\Comparator\\Struct', null, array(
2.3,
)),
$this
->getMock('SebastianBergmann\\Comparator\\Struct', null, array(
4.2,
)),
$equalMessage,
0.5,
),
);
}