Exemplo n.º 1
0
 public function testTryCRUDContentLang()
 {
     $content = new Content($this->nonMultilangPost);
     $content->save();
     $records = [['__lang_id__' => 1, 'title' => 'Foo', 'content' => 'Baar'], ['__lang_id__' => 2, 'title' => 'FooBus', 'content' => 'Bobuus']];
     $createdRecords = $content->ContentLangs()->createMany($records);
     $this->assertTrue($content->save());
     $this->assertEquals(2, count($createdRecords));
 }
Exemplo n.º 2
0
 public function testFoundedBugOnNullAttributes()
 {
     $content = new Content(['enable' => 1, 'visible' => 1, 'alias' => null]);
     $post = ['__lang_id__' => 1, 'title' => null, 'content' => null];
     $this->assertTrue($content->save());
     $content->ContentLangs()->create($post);
     $wrapper = $this->wrapper->createNew($content);
     $this->assertEquals(null, $wrapper->title);
     $this->assertEquals(null, $wrapper->title);
     $this->assertEquals(null, $wrapper->alias);
 }