Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PHPUnit fixtures #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/Auto/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class Test extends TestCase
private $tmp;


public function setUp(): void
protected function setUp(): void
{
$this->tmp = tempnam(sys_get_temp_dir(), "meta-audio-");
}


public function tearDown(): void
protected function tearDown(): void
{
unlink($this->tmp);
unset($this->tmp);
Expand Down
4 changes: 2 additions & 2 deletions tests/ModuleManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class ModuleManagerTest extends TestCase
private $manager;


public function setUp(): void
protected function setUp(): void
{
$manager = new ModuleManager();
$this->manager = new Intruder($manager);
}


public function tearDown(): void
protected function tearDown(): void
{
unset($this->manager);
Mockery::close();
Expand Down
4 changes: 2 additions & 2 deletions tests/Modules/AbstractModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AbstractModuleTest extends TestCase
{
private $module;

public function setUp(): void
protected function setUp(): void
{
$module = new AbstractModule();
$module->putTags([
Expand All @@ -23,7 +23,7 @@ public function setUp(): void
}


public function tearDown(): void
protected function tearDown(): void
{
unset($this->module);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Modules/Id3v2MockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Id3v2MockTest extends TestCase
{
private $module;

public function setUp(): void
protected function setUp(): void
{
$module = new Id3v2();
$this->module = new Intruder($module);
Expand Down
2 changes: 1 addition & 1 deletion tests/Modules/Id3v2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Id3v2Test extends TestCase
{
private $module;

public function setUp(): void
protected function setUp(): void
{
$file = new File(__DIR__ . "/../data/test.mp3");
$this->module = new Id3v2();
Expand Down
2 changes: 1 addition & 1 deletion tests/Mp3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Mp3Test extends TestCase
{

public function tearDown(): void
protected function tearDown(): void
{
Mockery::close();
}
Expand Down