Skip to content

Commit

Permalink
Merge pull request #19 from ARCANEDEV/patch-1
Browse files Browse the repository at this point in the history
Fixing the site name
  • Loading branch information
arcanedev-maroc authored Oct 27, 2016
2 parents cf9c4d8 + d92c355 commit de71737
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config/seo-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| ------------------------------------------------------------------------------------------------
*/
'title' => [
'default' => config('app.name', 'Laravel'),
'site-name' => '',
'default' => 'Default Title',
'site-name' => config('app.name', 'My Application'),
'separator' => '-',
'first' => true,
'max' => 55,
Expand Down
3 changes: 2 additions & 1 deletion tests/Entities/TitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ public function it_can_switch_title_position()
public function it_can_render_default_title()
{
$title = $this->getDefaultTitle();
$expected = "<title>$title</title>";
$siteName = $this->getDefaultSiteName();
$expected = "<title>{$title} - {$siteName}</title>";

$this->assertSame($expected, $this->title->render());
$this->assertSame($expected, (string) $this->title);
Expand Down
7 changes: 4 additions & 3 deletions tests/SeoMetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,20 @@ public function it_can_be_instantiated_by_container()
/** @test */
public function it_can_set_and_get_and_render_title()
{
$title = 'Awesome Title';
$title = 'Awesome Title';
$siteName = $this->getSeoHelperConfig('title.site-name');

$this->seoMeta->setTitle($title);

$expected = '<title>' . $title . '</title>';
$expected = "<title>{$title} - {$siteName}</title>";

$this->assertContains($expected, $this->seoMeta->render());
$this->assertContains($expected, (string) $this->seoMeta);

$siteName = 'Company name';
$this->seoMeta->setTitle($title, $siteName);

$expected = '<title>' . $title . ' - ' . $siteName . '</title>';
$expected = "<title>{$title} - {$siteName}</title>";

$this->assertContains($expected, $this->seoMeta->render());
$this->assertContains($expected, (string) $this->seoMeta);
Expand Down

0 comments on commit de71737

Please sign in to comment.