Rename example to atdc
This commit is contained in:
parent
db36e7a950
commit
3fecd35d1c
|
@ -1,7 +1,7 @@
|
|||
example.blog:
|
||||
atdc.blog:
|
||||
path: /blog
|
||||
defaults:
|
||||
_controller: Drupal\example\Controller\BlogPageController
|
||||
_controller: Drupal\atdc\Controller\BlogPageController
|
||||
_title: Blog
|
||||
requirements:
|
||||
_permission: access content
|
|
@ -1,4 +1,4 @@
|
|||
services:
|
||||
Drupal\example\Repository\PostNodeRepository:
|
||||
Drupal\atdc\Repository\PostNodeRepository:
|
||||
arguments:
|
||||
- '@entity_type.manager'
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\example\Builder;
|
||||
namespace Drupal\atdc\Builder;
|
||||
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
use Drupal\node\Entity\Node;
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\example\Controller;
|
||||
namespace Drupal\atdc\Controller;
|
||||
|
||||
use Drupal\atdc\Repository\PostNodeRepository;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Drupal\example\Repository\PostNodeRepository;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
class BlogPageController extends ControllerBase {
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\example;
|
||||
namespace Drupal\atdc;
|
||||
|
||||
use Drupal\node\NodeInterface;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\example\Repository;
|
||||
namespace Drupal\atdc\Repository;
|
||||
|
||||
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||
use Drupal\node\NodeInterface;
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\example\Functional;
|
||||
namespace Drupal\Tests\atdc\Functional;
|
||||
|
||||
use Drupal\example\Builder\PostBuilder;
|
||||
use Drupal\atdc\Builder\PostBuilder;
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
|
@ -13,7 +13,7 @@ class BlogPageTest extends BrowserTestBase {
|
|||
|
||||
protected $defaultTheme = 'stark';
|
||||
|
||||
protected static $modules = ['node', 'example'];
|
||||
protected static $modules = ['node', 'atdc'];
|
||||
|
||||
public function testBlogPage(): void {
|
||||
$this->drupalGet('/blog');
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\example\Functional;
|
||||
namespace Drupal\Tests\atdc\Functional;
|
||||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\example\Kernel\Builder;
|
||||
namespace Drupal\Tests\atdc\Kernel\Builder;
|
||||
|
||||
use Drupal\example\Builder\PostBuilder;
|
||||
use Drupal\atdc\Builder\PostBuilder;
|
||||
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\taxonomy\Entity\Term;
|
||||
|
@ -19,7 +19,7 @@ final class PostBuilderTest extends EntityKernelTestBase {
|
|||
'taxonomy',
|
||||
|
||||
// Custom.
|
||||
'example_test',
|
||||
'atdc_test',
|
||||
];
|
||||
|
||||
/** @test */
|
||||
|
@ -51,7 +51,7 @@ final class PostBuilderTest extends EntityKernelTestBase {
|
|||
$this->installEntitySchema(entity_type_id: 'taxonomy_term');
|
||||
|
||||
$this->installConfig(modules: [
|
||||
'example_test',
|
||||
'atdc_test',
|
||||
]);
|
||||
|
||||
$node = PostBuilder::create()
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\example\Kernel;
|
||||
namespace Drupal\Tests\atdc\Kernel;
|
||||
|
||||
use Drupal\example\Builder\PostBuilder;
|
||||
use Drupal\example\Repository\PostNodeRepository;
|
||||
use Drupal\atdc\Builder\PostBuilder;
|
||||
use Drupal\atdc\Repository\PostNodeRepository;
|
||||
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
|
||||
use Drupal\node\NodeInterface;
|
||||
|
||||
|
@ -12,7 +12,7 @@ use Drupal\node\NodeInterface;
|
|||
*/
|
||||
class PostNodeRepositoryTest extends EntityKernelTestBase {
|
||||
|
||||
protected static $modules = ['node', 'example'];
|
||||
protected static $modules = ['node', 'atdc'];
|
||||
|
||||
public function testPostsAreReturnedByCreatedDate(): void {
|
||||
// Arrange.
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\example\Unit;
|
||||
namespace Drupal\Tests\atdc\Unit;
|
||||
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||
use Drupal\example\Repository\PostNodeRepository;
|
||||
use Drupal\atdc\Repository\PostNodeRepository;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\example\Unit;
|
||||
namespace Drupal\Tests\atdc\Unit;
|
||||
|
||||
use Drupal\example\PostWrapper;
|
||||
use Drupal\atdc\PostWrapper;
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
@ -14,7 +14,7 @@ final class PostWrapperTest extends UnitTestCase {
|
|||
|
||||
/** @test */
|
||||
public function it_wraps_a_post(): void {
|
||||
$node = Node::create(['type' => 'post']);
|
||||
$node = $this->createMock(NodeInterface::class);
|
||||
$node->method('bundle')->willReturn('post');
|
||||
|
||||
$wrapper = new PostWrapper($node);
|
Loading…
Reference in a new issue