-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
642ec10
commit 71fce38
Showing
37 changed files
with
472 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":1,"defects":{"Cnj\\Seotamic\\Tests\\SitemapTest::test_it_returns_a_working_sitemap":8,"Cnj\\Seotamic\\Tests\\SitemapTest::test_it_returns_404_when_sitemap_is_disabled":7,"Cnj\\Seotamic\\Tests\\MetaTest::test_it_returns_a_working_sitemap":8,"Cnj\\Seotamic\\Tests\\MetaTest::test_seotamic_title_is_returned_correctly":7,"Cnj\\Seotamic\\Tests\\MetaTest::test_seotamic_custom_title_is_returned_correctly":8,"Cnj\\Seotamic\\Tests\\MetaTest::test_meta_has_all_the_expected_keys":8,"Cnj\\Seotamic\\Tests\\SocialTest::test_meta_has_all_the_expected_keys":8},"times":{"Cnj\\Seotamic\\Tests\\ExampleTest::test_that_true_is_true":0.006,"Cnj\\Seotamic\\Tests\\SitemapTest::test_it_returns_404_when_sitemap_is_disabled":0.01,"Cnj\\Seotamic\\Tests\\SitemapTest::test_it_returns_a_working_sitemap":0.011,"Cnj\\Seotamic\\Tests\\BaseTest::test_that_true_is_true":0.003,"Cnj\\Seotamic\\Tests\\MetaTest::test_it_returns_a_working_sitemap":0.038,"Cnj\\Seotamic\\Tests\\MetaTest::test_meta_has_all_the_expected_keys":0.022,"Cnj\\Seotamic\\Tests\\MetaTest::test_seotamic_title_is_returned_correctly":0.011,"Cnj\\Seotamic\\Tests\\MetaTest::test_seotamic_custom_title_is_returned_correctly":0.036,"Cnj\\Seotamic\\Tests\\SocialTest::test_meta_has_all_the_expected_keys":0.013}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.1/phpunit.xsd" processIsolation="false" stopOnFailure="false" beStrictAboutTestsThatDoNotTestAnything="false" cacheDirectory=".phpunit.cache"> | ||
<testsuites> | ||
<testsuite name="Test Suite"> | ||
<directory suffix="Test.php">./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="APP_ENV" value="testing"/> | ||
<env name="APP_KEY" value="base64:ybcI9MKuhLnESRSuWDfnJQuohOXMBaynfbTC5Y5i1FE="/> | ||
<env name="BCRYPT_ROUNDS" value="4"/> | ||
<env name="CACHE_DRIVER" value="array"/> | ||
<!-- <env name="DB_CONNECTION" value="sqlite"/> --> | ||
<!-- <env name="DB_DATABASE" value=":memory:"/> --> | ||
<env name="MAIL_MAILER" value="array"/> | ||
<env name="QUEUE_CONNECTION" value="sync"/> | ||
<env name="SESSION_DRIVER" value="array"/> | ||
<env name="TELESCOPE_ENABLED" value="false"/> | ||
</php> | ||
<source/> | ||
</phpunit> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Cnj\Seotamic\Tests; | ||
|
||
class BaseTest extends TestCase | ||
{ | ||
public function test_that_true_is_true(): void | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Cnj\Seotamic\Tests; | ||
|
||
use Statamic\Facades\Entry; | ||
|
||
class MetaTest extends TestCase | ||
{ | ||
public function test_meta_has_all_the_expected_keys(): void | ||
{ | ||
$entry = Entry::find('home'); | ||
|
||
$this->assertArrayHasKey('title', $entry->seotamic_meta); | ||
$this->assertArrayHasKey('description', $entry->seotamic_meta); | ||
$this->assertArrayHasKey('canonical', $entry->seotamic_meta); | ||
$this->assertArrayHasKey('robots', $entry->seotamic_meta); | ||
$this->assertArrayHasKey('related', $entry->seotamic_meta); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Cnj\Seotamic\Tests; | ||
|
||
use Statamic\Facades\Config; | ||
|
||
class SitemapTest extends TestCase | ||
{ | ||
public function test_it_returns_404_when_sitemap_is_disabled(): void | ||
{ | ||
Config::set('seotamic.sitemap', false); | ||
|
||
$this | ||
->get('/sitemap.xml') | ||
->assertStatus(404); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Cnj\Seotamic\Tests; | ||
|
||
use Statamic\Facades\Entry; | ||
|
||
class SocialTest extends TestCase | ||
{ | ||
public function test_meta_has_all_the_expected_keys(): void | ||
{ | ||
$entry = Entry::find('home'); | ||
|
||
$this->assertArrayHasKey('open_graph', $entry->seotamic_social); | ||
$this->assertArrayHasKey('twitter', $entry->seotamic_social); | ||
$this->assertArrayHasKey('site_name', $entry->seotamic_social); | ||
$this->assertArrayHasKey('title', $entry->seotamic_social); | ||
$this->assertArrayHasKey('description', $entry->seotamic_social); | ||
$this->assertArrayHasKey('image', $entry->seotamic_social); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title: Assets | ||
disk: assets |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
title: Pages | ||
sites: | ||
- en | ||
- it | ||
- sl | ||
propagate: false | ||
template: default | ||
layout: layout | ||
revisions: false | ||
route: '{parent_uri}/{slug}' | ||
sort_dir: asc | ||
preview_targets: | ||
- | ||
label: Entry | ||
url: '{permalink}' | ||
refresh: true | ||
structure: | ||
root: true |
Oops, something went wrong.