Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3747522
D1541.id3932.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
928 B
Referenced Files
None
Subscribers
None
D1541.id3932.diff
View Options
diff --git a/tests/Phabricator/PhabricatorStoryTest.php b/tests/Phabricator/PhabricatorStoryTest.php
new file mode 100644
--- /dev/null
+++ b/tests/Phabricator/PhabricatorStoryTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Nasqueron\Notifications\Tests\Phabricator;
+
+use Nasqueron\Notifications\Phabricator\PhabricatorStory;
+use Nasqueron\Notifications\Tests\TestCase;
+
+class PhabricatorStoryTest extends TestCase {
+ /**
+ * @dataProvider provideStories
+ */
+ public function testGetObjectType ($expected, $data) {
+ $story = new PhabricatorStory('acme');
+ $story->data = $data;
+
+ $this->assertEquals($expected, $story->getObjectType());
+ }
+
+ public function provideStories () : iterable {
+ yield ["VOID", null];
+ yield ["VOID", []];
+ yield ["VOID", ['foo' => 'bar']];
+ yield ["TASK", ['objectPHID' => 'PHID-TASK-l34fw5wievp6n6rnvpuk']];
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 02:36 (13 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2248550
Default Alt Text
D1541.id3932.diff (928 B)
Attached To
Mode
D1541: Test PhabricatorStory::getObjectType
Attached
Detach File
Event Timeline
Log In to Comment