Skip to content

Commit

Permalink
Remove redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Nov 29, 2020
1 parent dd2b91b commit 1ec8a16
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 64 deletions.

This file was deleted.

2 changes: 0 additions & 2 deletions src-tests/Process/Fixtures/InvalidTests/NoClassTest.php

This file was deleted.

12 changes: 0 additions & 12 deletions src-tests/Process/Fixtures/InvalidTests/WrongClassTest.php

This file was deleted.

34 changes: 0 additions & 34 deletions src-tests/Process/ProcessSetCreatorTest.php
Expand Up @@ -123,40 +123,6 @@ public function testShouldCreateProcessSetFromGivenFiles(): void
$this->assertArraySubset($expectedEnv, $testEnv);
}

public function testShouldThrowExceptionIfAddingFileWithNoClass(): void
{
$files = $this->findDummyTests('NoClassTest.php', 'InvalidTests');

$this->expectException(\RuntimeException::class);
$this->expectExceptionMessageRegExp('/No class found in file ".*NoClassTest.php"/');

$this->creator->createFromFiles($files, [], []);
}

public function testShouldThrowExceptionIfAddingClassWithNameMismatchingTheFileName(): void
{
$files = $this->findDummyTests('WrongClassTest.php', 'InvalidTests');

$this->expectException(\RuntimeException::class);
$this->expectExceptionMessageRegExp(
'/Error loading class "Lmc\\\\Steward\\\\Process\\\\Fixtures\\\\InvalidTests\\\\ReallyWrongClassTest"'
. ' from file ".*WrongClassTest.php"/'
);

$this->creator->createFromFiles($files, [], []);
}

public function testShouldThrowExceptionIfMultipleClassesAreDefinedInFile(): void
{
$files = $this->findDummyTests('MultipleClassesInFileTest.php', 'InvalidTests');

$this->expectException(\RuntimeException::class);
$this->expectExceptionMessageRegExp(
'/File ".*MultipleClassesInFileTest.php" contains definition of 2 classes/'
);
$this->creator->createFromFiles($files, [], []);
}

public function testShouldOnlyAddTestsOfGivenGroups(): void
{
$processSet = $this->creator->createFromFiles($this->findDummyTests(), ['bar', 'foo'], []);
Expand Down

0 comments on commit 1ec8a16

Please sign in to comment.