for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class FileCollectorTest extends FileSystemTest
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.
{
/**
* @test
*/
public function it_can_get_a_php_file_from_a_folder()
file_put_contents("{$this->path}/foobar.php", 'foobar.txt');
$files = $this->fileCollector
fileCollector
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;
->get('.php')
->from($this->path);
$this->assertCount(1, $files);
$this->assertContains('foobar.php', $files[0]);
}
public function setup()
parent::setup();
$this->fileCollector = new Bmitch\Envsync\Collectors\FileCollector;
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.