Esempio n. 1
0
 public function testSaveTags()
 {
     $tags = array('test', 'save');
     $source = new Mock\Source();
     $source->description = "Saved";
     $source->tags = $tags;
     $this->assertTrue($source->save());
     $id = $source->id();
     $this->assertEquals($tags, $source->tags);
     $statement = SDBFactory::Get("SELECT * FROM sources WHERE itemName() = \"{$id}\"");
     $statement->execute();
     $savedSource = $statement->fetchInto('\\FlexibleORMTests\\Mock\\Source');
     $this->assertEquals($tags, $savedSource->tags);
 }
Esempio n. 2
0
 public function testTableEscaping()
 {
     $query = SDBFactory::Get("SELECT * FROM `123_mustbeescaped` LIMIT 1");
     $this->assertTrue($query->execute(), 'Query failed');
 }