Skip to content

Commit

Permalink
Add src/Fp/Operations to code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
klimick committed Sep 4, 2022
1 parent e8e7596 commit 2f65fd9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
cacheResultFile=".phpunit.result.cache"
Expand All @@ -12,6 +11,7 @@
<directory suffix=".php">src/Fp/Functional</directory>
<directory suffix=".php">src/Fp/Functions</directory>
<directory suffix=".php">src/Fp/Collections</directory>
<directory suffix=".php">src/Fp/Operations</directory>
<directory suffix=".php">src/Fp/Streams</directory>
</include>
<report>
Expand Down
3 changes: 3 additions & 0 deletions tests/Runtime/Classes/Either/EitherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function testToString(): void
$this->assertEquals('Right(42)', (string) Either::right(42));
$this->assertEquals('Left(42)', Either::left(42)->toString());
$this->assertEquals('Right(42)', Either::right(42)->toString());
$this->assertEquals('Right([])', Either::right([]));
$this->assertEquals("Right([1, 2, 3])", Either::right([1, 2, 3]));
$this->assertEquals("Right(['t' => 1])", Either::right(['t' => 1]));
}

public function testCreation(): void
Expand Down
2 changes: 2 additions & 0 deletions tests/Runtime/Classes/Option/OptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function testToString(): void
$this->assertEquals('Some(42)', (string) Option::some(42));
$this->assertEquals('None', Option::none()->toString());
$this->assertEquals('Some(42)', Option::some(42)->toString());
$this->assertEquals('Some(true)', Option::some(true)->toString());
$this->assertEquals('Some(false)', Option::some(false)->toString());
}

public function testCreation(): void
Expand Down

0 comments on commit 2f65fd9

Please sign in to comment.