Skip to content

Commit

Permalink
Merge pull request #53 from mikebronner/fix-tests
Browse files Browse the repository at this point in the history
Fix tests.
  • Loading branch information
jenssegers authored Jul 25, 2024
2 parents 3321a82 + c3021a4 commit 8a81b2e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ phpunit.phar
composer.lock
.phpunit.result.cache
.idea
.phpunit*
40 changes: 17 additions & 23 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="true"
>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging/>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
4 changes: 2 additions & 2 deletions tests/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ public function testGuardedCallback()
{
ModelStub::unguard();
$mock = $this->getMockBuilder('stdClass')
->setMethods(['callback'])
->addMethods(['callback'])
->getMock();
$mock->expects($this->once())
->method('callback')
->will($this->returnValue('foo'));
->willReturn('foo');
$string = ModelStub::unguarded([$mock, 'callback']);
$this->assertEquals('foo', $string);
ModelStub::reguard();
Expand Down

0 comments on commit 8a81b2e

Please sign in to comment.