for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Basis\Converter;
use Basis\Event;
class EventTest extends TestSuite
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function test()
$event = $this->app->get(Event::class);
app
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
$subscription = $event->getSubscription();
$this->assertArrayHasKey('person.created', $subscription);
$this->assertSame($subscription['person.created'], ['Create\\Login']);
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.