Page MenuHomeDevCentral

D1541.id3932.diff
No OneTemporary

D1541.id3932.diff

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

Mime Type
text/plain
Expires
Sun, Nov 17, 15:31 (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2248550
Default Alt Text
D1541.id3932.diff (928 B)

Event Timeline