Skip to content
Draft
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"require": {
"guzzlehttp/guzzle": "~6.0"
"guzzlehttp/guzzle": "^7.8"
},
"require-dev": {
"phpunit/phpunit": "*",
Expand Down
28 changes: 12 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="OC Client">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage/>
<testsuites>
<testsuite name="OC Client">
<directory>./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src/</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testRenderComponents()
]);

$this->assertEquals(2, count($components['html']));
$this->assertRegexp('/script/', $components['html'][0]);
$this->assertMatchesRegularExpression('/script/', $components['html'][0]);
}

public function mockComponentDataRetriever($config)
Expand Down
4 changes: 2 additions & 2 deletions tests/ComponentDataRetrieverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testRequestMethodForOneComp()

$compDataRetriever = $this->getMockBuilder(ComponentDataRetriever::class)
->setConstructorArgs([$this->config])
->setMethods(['performGet'])
->onlyMethods(['performGet'])
->getMock();
$compDataRetriever->expects($this->once())
->method('performGet');
Expand All @@ -52,7 +52,7 @@ public function testRequestMethodForOneComp()
$twoComp['components'][] = 'some-other-component';
$compDataRetrieverTwo = $this->getMockBuilder(ComponentDataRetriever::class)
->setConstructorArgs([$twoComp])
->setMethods(['performPost'])
->onlyMethods(['performPost'])
->getMock();
$compDataRetrieverTwo->expects($this->once())
->method('performPost');
Expand Down