|
|
|
@ -31,14 +31,15 @@ class {$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\${$this->single_model_var_name} = factory({$this->model_name}::class)->create(); |
|
|
|
|
|
|
|
\$this->assertEquals( |
|
|
|
link_to_route('{$this->table_name}.show', \${$this->single_model_var_name}->name, [\${$this->single_model_var_name}], [ |
|
|
|
'title' => __( |
|
|
|
'app.show_detail_title', |
|
|
|
['name' => \${$this->single_model_var_name}->name, 'type' => __('{$this->lang_name}.{$this->lang_name}')] |
|
|
|
), |
|
|
|
]), \${$this->single_model_var_name}->name_link |
|
|
|
); |
|
|
|
\$title = __('app.show_detail_title', [ |
|
|
|
'name' => \${$this->single_model_var_name}->name, 'type' => __('vehicle.vehicle'), |
|
|
|
]); |
|
|
|
\$link = '<a href=\"'.route('vehicles.show', \${$this->single_model_var_name}).'\"'; |
|
|
|
\$link .= ' title=\"'.\$title.'\">'; |
|
|
|
\$link .= \${$this->single_model_var_name}->name; |
|
|
|
\$link .= '</a>'; |
|
|
|
|
|
|
|
\$this->assertEquals(\$link, \${$this->single_model_var_name}->name_link); |
|
|
|
} |
|
|
|
|
|
|
|
/** @test */ |
|
|
|
@ -82,14 +83,15 @@ class {$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\${$this->single_model_var_name} = factory({$this->model_name}::class)->create(); |
|
|
|
|
|
|
|
\$this->assertEquals( |
|
|
|
link_to_route('{$this->table_name}.show', \${$this->single_model_var_name}->name, [\${$this->single_model_var_name}], [ |
|
|
|
'title' => __( |
|
|
|
'app.show_detail_title', |
|
|
|
['name' => \${$this->single_model_var_name}->name, 'type' => __('{$this->lang_name}.{$this->lang_name}')] |
|
|
|
), |
|
|
|
]), \${$this->single_model_var_name}->name_link |
|
|
|
); |
|
|
|
\$title = __('app.show_detail_title', [ |
|
|
|
'name' => \${$this->single_model_var_name}->name, 'type' => __('vehicle.vehicle'), |
|
|
|
]); |
|
|
|
\$link = '<a href=\"'.route('vehicles.show', \${$this->single_model_var_name}).'\"'; |
|
|
|
\$link .= ' title=\"'.\$title.'\">'; |
|
|
|
\$link .= \${$this->single_model_var_name}->name; |
|
|
|
\$link .= '</a>'; |
|
|
|
|
|
|
|
\$this->assertEquals(\$link, \${$this->single_model_var_name}->name_link); |
|
|
|
} |
|
|
|
|
|
|
|
/** @test */ |
|
|
|
@ -133,14 +135,15 @@ class {$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\${$this->single_model_var_name} = factory({$this->model_name}::class)->create(); |
|
|
|
|
|
|
|
\$this->assertEquals( |
|
|
|
link_to_route('{$this->table_name}.show', \${$this->single_model_var_name}->name, [\${$this->single_model_var_name}], [ |
|
|
|
'title' => __( |
|
|
|
'app.show_detail_title', |
|
|
|
['name' => \${$this->single_model_var_name}->name, 'type' => __('{$this->lang_name}.{$this->lang_name}')] |
|
|
|
), |
|
|
|
]), \${$this->single_model_var_name}->name_link |
|
|
|
); |
|
|
|
\$title = __('app.show_detail_title', [ |
|
|
|
'name' => \${$this->single_model_var_name}->name, 'type' => __('vehicle.vehicle'), |
|
|
|
]); |
|
|
|
\$link = '<a href=\"'.route('vehicles.show', \${$this->single_model_var_name}).'\"'; |
|
|
|
\$link .= ' title=\"'.\$title.'\">'; |
|
|
|
\$link .= \${$this->single_model_var_name}->name; |
|
|
|
\$link .= '</a>'; |
|
|
|
|
|
|
|
\$this->assertEquals(\$link, \${$this->single_model_var_name}->name_link); |
|
|
|
} |
|
|
|
|
|
|
|
/** @test */ |
|
|
|
|