File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ before_install:
17
17
18
18
install :
19
19
- composer require --no-update --no-interaction "phpunit/phpunit:*" "squizlabs/php_codesniffer:*" "fabpot/php-cs-fixer:*"
20
- - travis_retry composer install --no-interaction --prefer-source
20
+ - travis_retry composer update --no-interaction --prefer-source
21
21
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
22
22
23
23
script :
Original file line number Diff line number Diff line change 5
5
6
6
require __DIR__ . '/extra/TestMockObject.php ' ;
7
7
require __DIR__ . '/extra/ExtendsTestMockObject.php ' ;
8
+ require __DIR__ . '/extra/StringObject.php ' ;
Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ class TestMockObject
10
10
11
11
public function __toString ()
12
12
{
13
+ return '' ;
13
14
}
14
15
}
Original file line number Diff line number Diff line change @@ -34,11 +34,10 @@ public function testStringConversion()
34
34
'object.method ' => false ,
35
35
]);
36
36
37
- $ mock = $ this ->getMock ('Test\TestMockObject ' , ['__toString ' , 'toPHP ' ]);
38
- $ mock ->expects ($ this ->once ())->method ('__toString ' )->will ($ this ->returnValue ('Mocked ' ));
37
+ $ mock = $ this ->getMock ('Test\StringObject ' , ['toPHP ' ]);
39
38
$ mock ->expects ($ this ->exactly (0 ))->method ('toPHP ' );
40
39
41
- $ this ->assertSame ('Mocked ' , eval ('return ' . $ encoder ->encode ($ mock ) . '; ' ));
40
+ $ this ->assertSame ('Stringed ' , eval ('return ' . $ encoder ->encode ($ mock ) . '; ' ));
42
41
}
43
42
44
43
public function testPHPValue ()
You can’t perform that action at this time.
0 commit comments