public function setUp() { parent::setUp(); $this->userId = 217784; $this->board = new PulseBoard(19306968); $this->pulse = $this->board->createPulse('Flapping Umbrella', $this->userId, 'dynamic_pulses'); }
public function setUp() { parent::setUp(); $this->id = 19306968; $this->userId = 217784; $this->board = new PulseBoard($this->id); $this->pulses = $this->board->getPulses(); }
public function testCreateUpdate() { $pulse = $this->board->createPulse("Neurotic Jackhammer Detective", $this->userId); $updateContent = self::updateProvider(); $pulse->createUpdate($updateContent[0][0], $updateContent[0][1]); $pulse->createUpdate($updateContent[1][0], $updateContent[1][1]); $this->assertCountEqual(2, $pulse->getUpdates()); return $pulse; }
/** * @depends testBoardCreation * * @param mixed $arrayOfValues */ public function testBoardDeletion($arrayOfValues) { /* @var $board PulseBoard */ $board = $arrayOfValues["board"]; $board->archiveBoard(); $currentBoardCount = count(PulseBoard::getBoards()); $this->assertEquals($arrayOfValues["initial"], $currentBoardCount); }
public function setUp() { $authClient = new AuthenticatedClient("phpunit-auth.json"); if (!$authClient->isAuthenticationSetup()) { $this->markTestSkipped(); } PulseBoard::setApiKey($authClient->getApiToken()); VCR::turnOn(); VCR::insertCassette('PhpPulseVCR'); }
/** * @depends testAddingSubscriber */ public function testRemovingSubscriber() { $this->board->removeSubscriber($this->user2); $subscribers = $this->board->getSubscribers(); $this->assertCountEqual(1, $subscribers); }
<?php use allejo\DaPulse\PulseBoard; // Create the main application $app = new Silex\Application(); // Register kernel extensions $app->register(new DerAlex\Silex\YamlConfigServiceProvider(__DIR__ . '/../config.yml')); $app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views')); // Register Twig extensions $app['twig'] = $app->share($app->extend('twig', function ($twig, $app) { $twig->addExtension(new allejo\DaPulser\Twig\DateParserFilter($app)); $twig->addExtension(new allejo\DaPulser\Twig\WufooUploadFilter($app)); return $twig; })); // Setup our DaPulse library PulseBoard::setApiKey($app['config']['dapulse']['apikey']); return $app;
public function testCreatePulseInGroup() { $myGroup = $this->pulseBoard->createGroup("Unicorn Group"); $newPulse = $this->pulseBoard->createPulse("Feed the Unicorn", $this->userID, $myGroup->getId()); $this->assertEquals($myGroup->getId(), $newPulse->getGroupId()); }
private function webRequestPost($content, $fields) { $entryId = $fields["EntryId"]; $priority = $fields["Field113"]; $webProjectsBoard = new PulseBoard($this->webRequestsId); $newPulse = $webProjectsBoard->createPulse("Web Request #" . $entryId, $this->vladId, "web_requests"); $newPulse->getTextColumn("text")->updateValue($priority); $newPulse->getPersonColumn("person")->updateValue($this->vladId); $newPulse->addNote("Web Request Details", $content); return $newPulse->getId(); }
private function pulseInjection(&$result) { $parentBoard = new PulseBoard($this->getBoardId()); // Inject some information so a Pulse object can survive on its own $result["pulse"]["group_id"] = $result["board_meta"]["group_id"]; $result["pulse"]["column_structure"] = $parentBoard->getColumns(); $result["pulse"]["raw_column_values"] = $result["column_values"]; }
public function testGetBoardUpdatedAt() { $this->assertInstanceOf("DateTime", $this->board->getUpdatedAt()); }