-
Notifications
You must be signed in to change notification settings - Fork 0
Test Execution
Kurt Vanderwater edited this page Feb 10, 2015
·
15 revisions
% pwd
/Users/kurtvanderwater/git/Classiphpy
% cat run.php
<?php
$data = [
"defaults" => [
"namespace" => "EclipseGc"
],
"classes" => [
"Person" => [
"properties" => [
"first" => [
'type' => 'string',
'description' => 'The first name of the person.',
],
"last" => [
'type' => 'string',
'description' => 'the last name of the person.',
]
],
"namespace" => "EclipseGc\\Person",
],
"Animal" => [
"properties" => [
"kingdom" => [
'type' => 'string',
'description' => 'The kingdom to which the animal belongs.'
],
"phylum" => [
'type' => 'string',
'description' => 'The phylum to which the animal belongs.'
],
"genus" => [
'type' => 'string',
'description' => 'The genus to which the animal belongs.'
],
"species" => [
'type' => 'string',
'description' => 'The species to which the animal belongs.'
],
],
"namespace" => "EclipseGc\\Animal",
]
]
];
$output = new \Classiphpy\Output\DefaultOutput('testout');
$test = new Classiphpy(['\Classiphpy\Definition\DefaultDefinition'], $output);
$processor = new \Classiphpy\Processor\PSR4PhpProcessor('src');
$test->build($data, $processor);
?>
% php -v
PHP 5.5.18 (cli) (built: Oct 29 2014 07:32:00)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
% php run.php
PHP Fatal error: Class 'Classiphpy\Output\DefaultOutput' not found in /Users/kurtvanderwater/git/Classiphpy/run.php on line 45
Fatal error: Class 'Classiphpy\Output\DefaultOutput' not found in /Users/kurtvanderwater/git/Classiphpy/run.php on line 45