Skip to content

Commit

Permalink
Fix minor corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Sep 27, 2023
1 parent a77d1b3 commit 5ef9184
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function testListCollections()

$collections = $connection->createCommand()->listCollections();
$collectionNames = ArrayHelper::getColumn($collections, 'name');
$this->assertStringContainsString('customer', $collectionNames);
$this->assertContains('customer', $collectionNames);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/console/controllers/MigrateControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function testNamespaceCreate()
$files = FileHelper::findFiles($this->migrationPath);
$fileContent = file_get_contents($files[0]);
$this->assertStringContainsString("namespace {$this->migrationNamespace};", $fileContent);
$this->assertRegExp('/class M[0-9]{12}' . ucfirst($migrationName) . '/s', $fileContent);
$this->assertMatchesRegularExpression('/class M[0-9]{12}' . ucfirst($migrationName) . '/s', $fileContent);
unlink($files[0]);

// namespace specify :
Expand Down Expand Up @@ -454,8 +454,8 @@ public function testNamespaceHistory()
$this->runMigrateControllerAction('up', [], $controllerConfig);

$output = $this->runMigrateControllerAction('history', [], $controllerConfig);
$this->assertRegExp('/' . preg_quote($this->migrationNamespace) . '.*History1/s', $output);
$this->assertRegExp('/' . preg_quote($this->migrationNamespace) . '.*History2/s', $output);
$this->assertMatchesRegularExpression('/' . preg_quote($this->migrationNamespace) . '.*History1/s', $output);
$this->assertMatchesRegularExpression('/' . preg_quote($this->migrationNamespace) . '.*History2/s', $output);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions tests/rbac/MongoDbManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public function testGetRules()
$ruleNames[] = $rule->name;
}

$this->assertStringContainsString('isReallyReallyAuthor', $ruleNames);
$this->assertStringContainsString('isAuthor', $ruleNames);
$this->assertContains('isReallyReallyAuthor', $ruleNames);
$this->assertContains('isAuthor', $ruleNames);
}

public function testRemoveRule()
Expand Down Expand Up @@ -362,8 +362,8 @@ public function testAssignMultipleRoles()
$roleNames[] = $role->name;
}

$this->assertStringContainsString('reader', $roleNames, 'Roles should contain reader. Currently it has: ' . implode(', ', $roleNames));
$this->assertStringContainsString('author', $roleNames, 'Roles should contain author. Currently it has: ' . implode(', ', $roleNames));
$this->assertContains('reader', $roleNames, 'Roles should contain reader. Currently it has: ' . implode(', ', $roleNames));
$this->assertContains('author', $roleNames, 'Roles should contain author. Currently it has: ' . implode(', ', $roleNames));
}

public function testAssignmentsToIntegerId()
Expand Down

0 comments on commit 5ef9184

Please sign in to comment.