Page MenuHomeDevCentral

D281.diff
No OneTemporary

D281.diff

diff --git a/tests/Actions/AMQPActionTest.php b/tests/Actions/AMQPActionTest.php
--- a/tests/Actions/AMQPActionTest.php
+++ b/tests/Actions/AMQPActionTest.php
@@ -20,6 +20,6 @@
public function testPublicProperties () {
$this->assertNull($this->action->error);
- $this->assertEquals('AMQPAction', $this->action->action);
+ $this->assertSame('AMQPAction', $this->action->action);
}
}
diff --git a/tests/Actions/ActionsReportTest.php b/tests/Actions/ActionsReportTest.php
--- a/tests/Actions/ActionsReportTest.php
+++ b/tests/Actions/ActionsReportTest.php
@@ -22,7 +22,7 @@
$this->assertEmpty($this->report->gate);
$this->assertEmpty($this->report->door);
$this->assertFalse($this->report->containsError());
- $this->assertEquals(0, count($this->report->actions));
+ $this->assertSame(0, count($this->report->actions));
// Adds a first action
// Our report should be valid.
@@ -32,7 +32,7 @@
);
$this->report->addAction($action);
- $this->assertEquals(1, count($this->report->actions));
+ $this->assertSame(1, count($this->report->actions));
$this->assertFalse($this->report->containsError());
// Let's attach an exception to a new action.
@@ -45,13 +45,13 @@
$action->attachError(new ActionError($ex));
$this->report->addAction($action);
- $this->assertEquals(2, count($this->report->actions));
+ $this->assertSame(2, count($this->report->actions));
$this->assertTrue($this->report->containsError());
// Attaches to gate
$this->report->attachToGate('QuuxGate', 'Quuxians');
- $this->assertEquals('QuuxGate', $this->report->gate);
- $this->assertEquals('Quuxians', $this->report->door);
+ $this->assertSame('QuuxGate', $this->report->gate);
+ $this->assertSame('Quuxians', $this->report->door);
// Test rendering
$actualReport = (string)$this->report;
diff --git a/tests/Actions/NotifyNewCommitsActionTest.php b/tests/Actions/NotifyNewCommitsActionTest.php
--- a/tests/Actions/NotifyNewCommitsActionTest.php
+++ b/tests/Actions/NotifyNewCommitsActionTest.php
@@ -19,6 +19,6 @@
public function testPublicProperties () {
$this->assertNull($this->action->error);
- $this->assertEquals('NotifyNewCommitsAction', $this->action->action);
+ $this->assertSame('NotifyNewCommitsAction', $this->action->action);
}
}
diff --git a/tests/Analyzers/GitHub/Events/PushEventTest.php b/tests/Analyzers/GitHub/Events/PushEventTest.php
--- a/tests/Analyzers/GitHub/Events/PushEventTest.php
+++ b/tests/Analyzers/GitHub/Events/PushEventTest.php
@@ -33,16 +33,16 @@
public function testGetRepositoryAndBranch () {
- $this->assertEquals("", PushEvent::getRepositoryAndBranch("", "master"));
- $this->assertEquals("", PushEvent::getRepositoryAndBranch("", "foo"));
- $this->assertEquals("quux", PushEvent::getRepositoryAndBranch("quux", "master"));
- $this->assertEquals("quux", PushEvent::getRepositoryAndBranch("quux", "refs/heads/master"));
- $this->assertEquals("quux", PushEvent::getRepositoryAndBranch("quux", ""));
- $this->assertEquals("quux (branch foo)", PushEvent::getRepositoryAndBranch("quux", "refs/heads/foo"));
- $this->assertEquals("quux (branch feature/foo)", PushEvent::getRepositoryAndBranch("quux", "refs/heads/feature/foo"));
- $this->assertEquals("quux (branch feature/foo)", PushEvent::getRepositoryAndBranch("quux", "feature/foo"));
- $this->assertEquals("quux (branch foo)", PushEvent::getRepositoryAndBranch("quux", "foo"));
- $this->assertEquals("quux (branch 0)", PushEvent::getRepositoryAndBranch("quux", "0"));
+ $this->assertSame("", PushEvent::getRepositoryAndBranch("", "master"));
+ $this->assertSame("", PushEvent::getRepositoryAndBranch("", "foo"));
+ $this->assertSame("quux", PushEvent::getRepositoryAndBranch("quux", "master"));
+ $this->assertSame("quux", PushEvent::getRepositoryAndBranch("quux", "refs/heads/master"));
+ $this->assertSame("quux", PushEvent::getRepositoryAndBranch("quux", ""));
+ $this->assertSame("quux (branch foo)", PushEvent::getRepositoryAndBranch("quux", "refs/heads/foo"));
+ $this->assertSame("quux (branch feature/foo)", PushEvent::getRepositoryAndBranch("quux", "refs/heads/feature/foo"));
+ $this->assertSame("quux (branch feature/foo)", PushEvent::getRepositoryAndBranch("quux", "feature/foo"));
+ $this->assertSame("quux (branch foo)", PushEvent::getRepositoryAndBranch("quux", "foo"));
+ $this->assertSame("quux (branch 0)", PushEvent::getRepositoryAndBranch("quux", "0"));
}
///
@@ -50,8 +50,8 @@
///
public function testGetCommitTitle () {
- $this->assertEquals("", PushEvent::getCommitTitle(""));
- $this->assertEquals("Lorem ipsum dolor", PushEvent::getCommitTitle("Lorem ipsum dolor"));
+ $this->assertSame("", PushEvent::getCommitTitle(""));
+ $this->assertSame("Lorem ipsum dolor", PushEvent::getCommitTitle("Lorem ipsum dolor"));
$longCommitMessages = [
"I was born in a water moon. Some people, especially its inhabitants, called it a planet, but as it was only a little over two hundred kilometres in diameter, 'moon' seems the more accurate term. The moon was made entirely of water, by which I mean it was a globe that not only had no land, but no rock either, a sphere with no solid core at all, just liquid water, all the way down to the very centre of the globe.",
@@ -59,7 +59,7 @@
];
$shortCommitTitle = "I was born in a water moon. Some people, especially its inhabitants, ca…";
foreach ($longCommitMessages as $longCommitMessage) {
- $this->assertEquals(
+ $this->assertSame(
$shortCommitTitle,
PushEvent::getCommitTitle($longCommitMessage)
);
diff --git a/tests/Analyzers/GitHub/GitHubPayloadAnalyzerConfigurationTest.php b/tests/Analyzers/GitHub/GitHubPayloadAnalyzerConfigurationTest.php
--- a/tests/Analyzers/GitHub/GitHubPayloadAnalyzerConfigurationTest.php
+++ b/tests/Analyzers/GitHub/GitHubPayloadAnalyzerConfigurationTest.php
@@ -34,8 +34,8 @@
* Determines the JSON object is well parsed
*/
public function testProperties () {
- $this->assertEquals("orgz", $this->configuration->administrativeGroup);
- $this->assertEquals("nasqueron", $this->configuration->defaultGroup);
+ $this->assertSame("orgz", $this->configuration->administrativeGroup);
+ $this->assertSame("nasqueron", $this->configuration->defaultGroup);
foreach ($this->configuration->repositoryMapping as $item) {
$this->assertInstanceOf(
diff --git a/tests/Notifications/DockerHubNotificationTest.php b/tests/Notifications/DockerHubNotificationTest.php
--- a/tests/Notifications/DockerHubNotificationTest.php
+++ b/tests/Notifications/DockerHubNotificationTest.php
@@ -28,16 +28,16 @@
}
public function testProperties () {
- $this->assertEquals("DockerHub", $this->notification->service);
- $this->assertEquals("Acme", $this->notification->project);
- $this->assertEquals("docker", $this->notification->group);
- $this->assertEquals($this->payload, $this->notification->rawContent);
- $this->assertEquals("push", $this->notification->type);
- $this->assertEquals(
+ $this->assertSame("DockerHub", $this->notification->service);
+ $this->assertSame("Acme", $this->notification->project);
+ $this->assertSame("docker", $this->notification->group);
+ $this->assertSame($this->payload, $this->notification->rawContent);
+ $this->assertSame("push", $this->notification->type);
+ $this->assertSame(
"New image pushed to Docker Hub registry for svendowideit/testhook by trustedbuilder",
$this->notification->text
);
- $this->assertEquals(
+ $this->assertSame(
"https://registry.hub.docker.com/u/svendowideit/testhook/",
$this->notification->link
);
diff --git a/tests/Providers/ServicesServiceProviderTest.php b/tests/Providers/ServicesServiceProviderTest.php
--- a/tests/Providers/ServicesServiceProviderTest.php
+++ b/tests/Providers/ServicesServiceProviderTest.php
@@ -29,13 +29,13 @@
Config::set('services.gate.credentials', null);
$services = $this->app->make('services');
- $this->assertEquals(0, count($services->services));
+ $this->assertSame(0, count($services->services));
}
public function testWithNontFoundCredentialsFile () {
Config::set('services.gate.credentials', 'notfound.json');
$services = $this->app->make('services');
- $this->assertEquals(0, count($services->services));
+ $this->assertSame(0, count($services->services));
}
}
diff --git a/tests/Services/ServicesTest.php b/tests/Services/ServicesTest.php
--- a/tests/Services/ServicesTest.php
+++ b/tests/Services/ServicesTest.php
@@ -20,7 +20,7 @@
$this->assertGreaterThan(0, $actualServices);
- $this->assertEquals(
+ $this->assertSame(
$this->services->services, // This is public, so testable
$actualServices
);
@@ -41,7 +41,7 @@
'Nasqueron\Notifications\Services\Service',
$service
);
- $this->assertEquals('GitHub', $service->gate);
+ $this->assertSame('GitHub', $service->gate);
}
}
@@ -53,8 +53,8 @@
'Nasqueron\Notifications\Services\Service',
$service
);
- $this->assertEquals('GitHub', $service->gate);
- $this->assertEquals('Acme', $service->door);
+ $this->assertSame('GitHub', $service->gate);
+ $this->assertSame('Acme', $service->door);
// Search doesn't give any result
@@ -74,8 +74,8 @@
'Nasqueron\Notifications\Services\Service',
$service
);
- $this->assertEquals('Phabricator', $service->gate);
- $this->assertEquals('Acme', $service->door);
+ $this->assertSame('Phabricator', $service->gate);
+ $this->assertSame('Acme', $service->door);
// Search doesn't give any result

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 05:43 (19 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2268556
Default Alt Text
D281.diff (10 KB)

Event Timeline