Strict comparisons

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-17 11:07:51 +01:00 committed by Morris Jobke
parent 036f5a6e08
commit 4626514a35
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ trait AppConfiguration {
$body = new \Behat\Gherkin\Node\TableNode([['value', $value]]);
$this->sendingToWith('post', "/apps/testing/api/v1/app/{$app}/{$parameter}", $body);
$this->theHTTPStatusCodeShouldBe('200');
if ($this->apiVersion == 1) {
if ($this->apiVersion === 1) {
$this->theOCSStatusCodeShouldBe('100');
}
}
@ -70,7 +70,7 @@ trait AppConfiguration {
protected function setStatusTestingApp($enabled) {
$this->sendingTo(($enabled ? 'post' : 'delete'), '/cloud/apps/testing');
$this->theHTTPStatusCodeShouldBe('200');
if ($this->apiVersion == 1) {
if ($this->apiVersion === 1) {
$this->theOCSStatusCodeShouldBe('100');
}

View File

@ -83,11 +83,11 @@ trait BasicStructure {
}
/**
* @Given /^using api version "([^"]*)"$/
* @Given /^using api version "(\d+)"$/
* @param string $version
*/
public function usingApiVersion($version) {
$this->apiVersion = $version;
$this->apiVersion = (int) $version;
}
/**