Skip to content

Commit

Permalink
Static methods + mocking = pain
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed Dec 13, 2016
1 parent a407fe7 commit 7263904
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/LeglislatureMethodsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ public function testDirectory()
// ]
// }
// NOW;
// Mockery::mock('alias:EveryPolitician\EveryPoliticianPopolo\Popolo')
// // I _cannot_ get this to work.
// // Mocking and static methods just don't mix
// Mockery::mock('alias:EveryPolitician\EveryPoliticianPopolo\Popolo', [$data])
// ->shouldReceive('fromUrl')
// ->with($popoloUrl)
// ->andReturn(new Popolo($data));
// ->andReturn(Mockery::self());
//
// $popolo = $l->popolo();
// $this->assertCount(1, $popolo->persons);
Expand Down

0 comments on commit 7263904

Please sign in to comment.