Class 'Split' not found
Closed this issue · 1 comments
donnekgit commented
I've run composer in the php-split dir and installed the dependencies. Then I create a file testme.php:
<?php
require __DIR__ .'/vendor/autoload.php';
$split = new Split();
var_dump($split->simple("您好 phpSplit"));
$this->assertTrue(True);
?>
and put that in the php-split dir. When I run php testme.php
, I get:
Fatal error: Class 'Split' not found
How can I fix this?
On a subsidiary point, how many of the dependencies downloaded are essential for running php-split - many of them seem to be unit-test related?
Callwoola commented
Thinks @donnekgit
this's my fault
I Fixed that.
require __DIR__ .'/vendor/autoload.php';
$split = new \phpSplit\Split\Split();
var_dump($split->simple("您好 phpSplit"));
and I think TestCase's dependencies was necessary . although very redundant.