protected function setTestData(array $identities) { $content = ''; foreach ($identities as $identity) { $line = "{$identity[0]}:{$identity[1]}:" . md5("{$identity[0]}:{$identity[1]}:{$identity[2]}") . PHP_EOL; $content .= $line; } file_put_contents($this->file->url(), $content); }
public function testYouCanFetchAChart() { $chart = new Chart(new StringType('foo bar'), new Organisation(new IntType(1), new StringType('Foo Org'), Factory::create('gbp'))); file_put_contents($this->root->url() . '/foo_bar.saccount', serialize($chart)); $this->assertEquals($chart, $this->sut->fetch(new StringType('foo bar'))); }
public function testCanCreateADigestEntry() { $this->object->create(new StringType('foo'), new StringType('bar')); $fileContent = file_get_contents($this->file->url()); $this->assertRegExp('/^foo:realm:.*$/', $fileContent); }