Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3791798
D276.id649.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D276.id649.diff
View Options
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
+ "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
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 13:37 (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2269043
Default Alt Text
D276.id649.diff (1 KB)
Attached To
Mode
D276: Test GitHubPayloadAnalyzer::GetConfigurationFileName()
Attached
Detach File
Event Timeline
Log In to Comment