PHP Classes

File: test/factories/user.php

Recommend this page to a friend!
  Classes of Eustaquio Rangel de Oliveira Jr.   PHP Torm ORM for ElasticSearch   test/factories/user.php   Download  
File: test/factories/user.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP Torm ORM for ElasticSearch
Adapter for Torm ORM to access Elastic
Author: By
Last change:
Date: 9 years ago
Size: 1,701 bytes
 

Contents

Class file image Download
<?php
TORM
\Factory::define("user",array(
                    
"id" => time(),
                    
"name" => "Mary Doe",
                    
"email" => "mary@doe.com",
                    
"level" => 1,
                    
"code" => "12345",
                    
"created_at" => null,
                    
"updated_at" => null));

TORM\Factory::define("admin",array(
                    
"id" => time(),
                    
"name" => "Mary Doe",
                    
"email" => "mary@doe.com",
                    
"level" => 1,
                    
"code" => "12345",
                    
"created_at" => null,
                    
"updated_at" => null),
                     array(
"class_name"=>"User"));

TORM\Factory::define("unnamed_user",array(
                    
"id" => time(),
                    
"name" => null,
                    
"email" => "mary@doe.com",
                    
"level" => 1,
                    
"code" => "12345",
                    
"created_at" => null,
                    
"updated_at" => null),
                     array(
"class_name"=>"User"));

TORM\Factory::define("crazy_user",array(
                    
"id" => time(),
                    
"name" => "Mary Doe",
                    
"email" => "mary@doe.com",
                    
"level" => 1,
                    
"code" => "12345",
                    
"invalid_attr" => "invalid",
                    
"created_at" => null,
                    
"updated_at" => null),
                     array(
"class_name"=>"User"));
?>