98. # cd /var/www/cakephp/app
# ./Console/cake bake
What would you like to Bake? (D/M/V/C/P/F/T/Q)
> T
Enter the type of object to bake a test for or (q)uit
(1/2/3/4/5/q)
[q] > 1
Choose a Model class
1. AppModel
2. Post
> 2
Wrote
`/var/www/cakephp/app/Test/Case/Model/PostTest.php`
99. What would you like to Bake? (D/M/V/C/P/F/T/Q)
> F
---------------------------------------------------------------
Bake Fixture
Path: /var/www/cakephp-2.6.4/app/Test/Fixture/
---------------------------------------------------------------
Use Database Config: (default/test)
Possible Models based on your current database:
1. Post
Enter a number from the list above,
type in the name of another model, or 'q' to exit
[q] > 1
Would you like to import schema for this fixture? (y/n)
[n] > y
Would you like to use record importing for this fixture? (y/n)
[n] > y
Baking test fixture for Post...
Creating file /var/www/cakephp-2.6.4/app/Test/Fixture/PostFixture.php
Wrote `/var/www/cakephp-2.6.4/app/Test/Fixture/PostFixture.php`
100. public function testgetActive(){
$actives = $this->Post->getActive();
foreach($actives as $row) {
$this->assertEquals('1', $row['Post']['active']);
}
}
/var/www/cakephp/app/Test/Case/Model/PostTest.php
http://IPアドレス/test.php