File
- drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php, line 691
Class
- Framework_AssertTest
- @package PHPUnit
@author Sebastian Bergmann <sebastian@phpunit.de>
@author Bernhard Schussek <bschussek@2bepublished.at>
@copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
@license …
Code
protected function equalValues() {
$book1 = new Book();
$book1->author = new Author('Terry Pratchett');
$book1->author->books[] = $book1;
$book2 = new Book();
$book2->author = new Author('Terry Pratchett');
$book2->author->books[] = $book2;
$object1 = new SampleClass(4, 8, 15);
$object2 = new SampleClass(4, 8, 15);
$storage1 = new SplObjectStorage();
$storage1
->attach($object1);
$storage2 = new SplObjectStorage();
$storage2
->attach($object1);
return array(
array(
'a',
'A',
0,
FALSE,
TRUE,
),
array(
array(
'a' => 1,
'b' => 2,
),
array(
'b' => 2,
'a' => 1,
),
),
array(
array(
1,
),
array(
'1',
),
),
array(
array(
3,
2,
1,
),
array(
2,
3,
1,
),
0,
TRUE,
),
array(
2.3,
2.5,
0.5,
),
array(
array(
2.3,
),
array(
2.5,
),
0.5,
),
array(
array(
array(
2.3,
),
),
array(
array(
2.5,
),
),
0.5,
),
array(
new Struct(2.3),
new Struct(2.5),
0.5,
),
array(
array(
new Struct(2.3),
),
array(
new Struct(2.5),
),
0.5,
),
array(
1,
2,
1,
),
array(
$object1,
$object2,
),
array(
$book1,
$book2,
),
array(
$storage1,
$storage2,
),
array(
$this
->createDOMDocument('<root></root>'),
$this
->createDOMDocument('<root/>'),
),
array(
$this
->createDOMDocument('<root attr="bar"></root>'),
$this
->createDOMDocument('<root attr="bar"/>'),
),
array(
$this
->createDOMDocument('<root><foo attr="bar"></foo></root>'),
$this
->createDOMDocument('<root><foo attr="bar"/></root>'),
),
array(
$this
->createDOMDocument("<root>\n <child/>\n</root>"),
$this
->createDOMDocument('<root><child/></root>'),
),
array(
0,
'0',
),
array(
'0',
0,
),
array(
2.3,
'2.3',
),
array(
'2.3',
2.3,
),
array(
(string) (1 / 3),
1 - 2 / 3,
),
array(
1 / 3,
(string) (1 - 2 / 3),
),
array(
'string representation',
new ClassWithToString(),
),
array(
new ClassWithToString(),
'string representation',
),
);
}