diff --git a/packages/php/email-editor/phpcs.xml b/packages/php/email-editor/phpcs.xml
index aea236529a..918a9146c4 100644
--- a/packages/php/email-editor/phpcs.xml
+++ b/packages/php/email-editor/phpcs.xml
@@ -11,6 +11,11 @@
tests/*
+
+
+ tests/unit/_bootstrap.php
+
+
vendor/*
diff --git a/packages/php/email-editor/tests/unit/Container_Test.php b/packages/php/email-editor/tests/unit/Container_Test.php
index 4f5a212508..c3e52de5af 100644
--- a/packages/php/email-editor/tests/unit/Container_Test.php
+++ b/packages/php/email-editor/tests/unit/Container_Test.php
@@ -1,12 +1,24 @@
-assertInstanceOf( stdClass::class, $service );
}
+ /**
+ * Test if sets and gets service with dependencies.
+ */
public function testGetReturnsSameInstance(): void {
$container = new Container();
@@ -32,19 +47,22 @@ class Container_Test extends TestCase {
}
);
- // Retrieve the service twice
+ // Retrieve the service twice.
$service1 = $container->get( 'singleton_service' );
$service2 = $container->get( 'singleton_service' );
- // Check that both instances are the same
+ // Check that both instances are the same.
$this->assertSame( $service1, $service2 );
}
+ /**
+ * Test if it throws exception for non-existing service.
+ */
public function testExceptionForNonExistingService(): void {
- // Create the container instance
+ // Create the container instance.
$container = new Container();
- // Attempt to get a non-existing service should throw an exception
+ // Attempt to get a non-existing service should throw an exception.
$this->expectException( Exception::class );
$this->expectExceptionMessage( 'Service not found: non_existing_service' );
diff --git a/packages/php/email-editor/tests/unit/_bootstrap.php b/packages/php/email-editor/tests/unit/_bootstrap.php
index 3d470608fb..c853a6e15a 100644
--- a/packages/php/email-editor/tests/unit/_bootstrap.php
+++ b/packages/php/email-editor/tests/unit/_bootstrap.php
@@ -1,16 +1,41 @@
-