Page MenuHomeDevCentral

D276.diff
No OneTemporary

D276.diff

diff --git a/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php b/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
--- a/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
+++ b/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
@@ -12,6 +12,11 @@
*/
private $unknownEventAnalyzer;
+ /**
+ * @var Nasqueron\Notifications\Analyzers\GitHub\GitHubPayloadAnalyzer
+ */
+ private $pingAnalyzer;
+
/**
* Prepares the tests
*/
@@ -19,10 +24,16 @@
parent::setUp();
$this->unknownEventAnalyzer = new GitHubPayloadAnalyzer(
- "Acme",
+ "Acme", // Expected without known config file
"quux",
new \stdClass
);
+
+ $this->pingAnalyzer = new GitHubPayloadAnalyzer(
+ "Nasqueron", // Expected with known config file
+ "ping",
+ new \stdClass
+ );
}
///
@@ -41,6 +52,24 @@
}
///
+ /// Test getConfigurationFileName
+ ///
+
+ public function testGetConfigurationFileNameWhenConfigExists () {
+ $this->assertSame(
+ "GitHubPayloadAnalyzer/Nasqueron.json",
+ $this->pingAnalyzer->getConfigurationFileName()
+ );
+ }
+
+ public function testGetConfigurationFileNameWhenConfigDoesNotExist () {
+ $this->assertSame(
+ "GitHubPayloadAnalyzer/default.json",
+ $this->unknownEventAnalyzer->getConfigurationFileName()
+ );
+ }
+
+ ///
/// Test if our fallback is correct when the GitHub event type is unknown
///

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 11:41 (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2268884
Default Alt Text
D276.diff (1 KB)

Event Timeline