Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3791487
D276.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.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 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
Details
Attached
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)
Attached To
Mode
D276: Test GitHubPayloadAnalyzer::GetConfigurationFileName()
Attached
Detach File
Event Timeline
Log In to Comment