create(); $this->assertTrue($postTemplateSection->postTemplate()->exists()); } /** @test */ public function it_gets_the_default_name() { $postTemplateSection = PostTemplateSection::factory()->create([ 'label' => null, 'label_translation_key' => 'template.label', ]); $this->assertEquals( 'template.label', $postTemplateSection->label ); } /** @test */ public function it_gets_the_custom_name_if_defined() { $postTemplateSection = PostTemplateSection::factory()->create([ 'label' => 'this is the real label', 'label_translation_key' => 'template.label', ]); $this->assertEquals( 'this is the real label', $postTemplateSection->label ); } }