for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Tarantool\Mapper\Mapper;
use Repositories\NoteRepository;
class TarantoolTest 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()
$this->app->dispatch('tarantool.migrate');
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;
$mapper = $this->app->get(Mapper::class);
$mapper->getRepository('note')->truncate();
$note = $mapper->getRepository('note')->create('zzz');
$this->assertSame($note->message, 'zzz');
$note->message = 'test';
$note->save();
$this->assertNotNull($note->id);
$this->assertSame($note->message, 'test');
}
public function testRepositoryRegistration()
$repository = $this->app->get(NoteRepository::class);
$this->assertSame($this->app->get(Mapper::class), $repository->getMapper());
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.