Updated test method for newer codeception from assertContains to assertStringContainsString

This commit is contained in:
snipe 2020-04-21 19:28:06 -07:00
parent 05e9861b71
commit 1c5486e588
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -47,7 +47,7 @@ class AccessoryTest extends BaseTest
$this->assertFalse($a->isValid());
$errors = $a->getErrors();
foreach ($fields as $field => $fieldTitle) {
$this->assertContains("The ${fieldTitle} must be at least", $errors->get($field)[0]);
$this->assertStringContainsString("The ${fieldTitle} must be at least", $errors->get($field)[0]);
}
}
@ -64,7 +64,7 @@ class AccessoryTest extends BaseTest
$accessory->save();
$this->assertFalse($accessory->isValid());
$this->assertContains("The selected category id is invalid.", $accessory->getErrors()->get('category_id')[0]);
$this->assertStringContainsString("The selected category id is invalid.", $accessory->getErrors()->get('category_id')[0]);
}
public function testAnAccessoryBelongsToACompany()