Last active
September 20, 2015 11:05
-
-
Save malkusch/c7005a1abaa35f2afba9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Foo | |
{ | |
public function bar(); | |
} | |
class BackupStaticAttributesTest extends \PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @backupStaticAttributes disabled | |
* @test | |
*/ | |
public function testNoBackupFirst() | |
{ | |
$foo = \Mockery::mock(Foo::class); | |
$foo->shouldReceive("bar")->andReturn("bar"); | |
$this->assertEquals("bar", $foo->bar()); | |
} | |
/** | |
* @test | |
* @backupStaticAttributes enabled | |
* @dataProvider provideTestBackupStaticAttributes | |
* @depends testNoBackupFirst | |
*/ | |
public function testBackupStaticAttributes() | |
{ | |
$foo = \Mockery::mock(Foo::class); | |
$foo->shouldReceive("bar")->andReturn("bar"); | |
$this->assertEquals("bar", $foo->bar()); | |
} | |
public function provideTestBackupStaticAttributes() | |
{ | |
return [ | |
[], | |
[] | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment