ソースを参照

add missing fixtures

euromark 12 年 前
コミット
0b5b89011b

+ 16 - 0
Test/Fixture/NewsArticleFixture.php

@@ -0,0 +1,16 @@
+<?php
+
+class NewsArticleFixture extends CakeTestFixture {
+
+	public $fields = array(
+		'id' => array('type' => 'integer', 'key' => 'primary'),
+		'title' => array('type' => 'string', 'length' => 255, 'null' => false)
+	);
+
+	public $records = array(
+		array('id' => 1, 'title' => 'CakePHP the best framework'),
+		array('id' => 2, 'title' => 'Zend the oldest framework'),
+		array('id' => 3, 'title' => 'Symfony the engineers framwork'),
+		array('id' => 4, 'title' => 'CodeIgniter wassat?')
+	);
+}

+ 17 - 0
Test/Fixture/NewsArticlesNewsCategoryFixture.php

@@ -0,0 +1,17 @@
+<?php
+
+class NewsArticlesNewsCategoryFixture extends CakeTestFixture {
+
+	public $fields = array(
+		'article_id' => array('type' => 'integer', 'key' => 'primary'),
+		'category_id' => array('type' => 'integer', 'key' => 'primary'),
+	);
+
+	public $records = array(
+		array('article_id' => 1, 'category_id' => 1),
+		array('article_id' => 1, 'category_id' => 2),
+		array('article_id' => 2, 'category_id' => 2),
+		array('article_id' => 2, 'category_id' => 3),
+		array('article_id' => 4, 'category_id' => 3),
+	);
+}

+ 15 - 0
Test/Fixture/NewsCategoryFixture.php

@@ -0,0 +1,15 @@
+<?php
+
+class NewsCategoryFixture extends CakeTestFixture {
+
+	public $fields = array(
+		'id' => array('type' => 'integer', 'key' => 'primary'),
+		'name' => array('type' => 'string', 'length' => 255, 'null' => false)
+	);
+
+	public $records = array(
+		array('id' => 1, 'name' => 'Development'),
+		array('id' => 2, 'name' => 'Programming'),
+		array('id' => 3, 'name' => 'Scripting'),
+	);
+}