function testCreateFile() { $file = fopen('php://memory', 'r+'); fwrite($file, 'foo'); rewind($file); $this->ab->createFile('card2', $file); $this->assertEquals('foo', $this->backend->cards['foo']['card2']); }