File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 1717 ],
1818 "require" : {
1919 "php" : " ^7.0" ,
20- "mockery/mockery " : " ^0.9.9 "
20+ "phpunit/phpunit " : " ^6.0 "
2121 },
2222 "require-dev" : {
2323 "phpunit/phpunit" : " ^6.0"
Original file line number Diff line number Diff line change 22
33namespace Spatie \Snapshots \Test \Unit ;
44
5- use Mockery ;
65use PHPUnit \Framework \TestCase ;
76use Spatie \Snapshots \Driver ;
87use Spatie \Snapshots \Filesystem ;
98use Spatie \Snapshots \Snapshot ;
109
1110class SnapshotTest extends TestCase
1211{
13- /** @var \Mockery\MockInterface */
12+ /** @var \PHPUnit_Framework_MockObject_MockObject */
1413 private $ filesystem ;
1514
16- /** @var \Mockery\MockInterface */
15+ /** @var \PHPUnit_Framework_MockObject_MockObject */
1716 private $ driver ;
1817
1918 public function setUp ()
2019 {
2120 parent ::setUp ();
2221
23- $ this ->filesystem = Mockery::mock (Filesystem::class);
24- $ this ->driver = Mockery::mock (Driver::class);
25- }
26-
27- public function tearDown ()
28- {
29- Mockery::close ();
22+ $ this ->filesystem = $ this ->createMock (Filesystem::class);
23+ $ this ->driver = $ this ->createMock (Driver::class);
3024 }
3125
3226 /** @test */
@@ -40,8 +34,11 @@ public function it_has_an_id()
4034 /** @test */
4135 public function it_has_a_filename_based_on_its_id_and_its_drivers_extension ()
4236 {
43- $ this ->driver ->shouldReceive ('extension ' )->andReturn ('.php ' );
44-
37+ $ this ->driver
38+ ->expects ($ this ->once ())
39+ ->method ('extension ' )
40+ ->willReturn ('.php ' );
41+
4542 $ snapshot = new Snapshot ('abc ' , $ this ->filesystem , $ this ->driver );
4643
4744 $ this ->assertEquals ('abc.php ' , $ snapshot ->filename ());
You can’t perform that action at this time.
0 commit comments