Beispiel #1
0
 /** @test */
 function it_saves_with_dirty_translations_on_create()
 {
     $node = $this->getNode();
     $node->fill(['visible' => 0, 'en' => ['title' => 'English Title', 'description' => 'English Description'], 'tr' => ['title' => 'Türkçe Başlık', 'description' => 'Türkçe Açıklama']]);
     $this->assertCount(2, $node->translations);
     $this->assertCount(0, NodeSource::all());
     $this->assertTrue($node->save());
     $node->load('translations');
     $this->assertCount(2, $node->translations);
     $this->assertCount(2, NodeSource::all());
 }