Skip to content

Commit

Permalink
No more need to unfinalize these classes for mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed Dec 7, 2017
1 parent d09e02a commit 82f3960
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions tests/unit/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ public function testPluginInfo()

$admin = '';
$this->setUpPluginAdministrationStubs();
uopz_flags(InfoController::class, null, 0);
$infoControllerMock = $this->createMock(InfoController::class);
$infoControllerMock->expects($this->once())->method('defaultAction');
uopz_set_mock(InfoController::class, $infoControllerMock);
(new Plugin)->run();
uopz_flags(InfoController::class, null, 4);
$this->tearDownPluginAdministrationStubs();
}

Expand Down
9 changes: 0 additions & 9 deletions tests/unit/ViewValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,9 @@ class ViewValueTest extends TestCase
*/
protected function setUp()
{
uopz_flags(View::class, null, 0); // un-final-ize class
$this->viewMock = $this->createMock(View::class);
}

/**
* @return void
*/
protected function tearDown()
{
uopz_flags(View::class, null, 4); // finalize class again
}

/**
* @return void
* @covers Pfw\View\ViewValue::create
Expand Down

0 comments on commit 82f3960

Please sign in to comment.