Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
3f6704b8
Commit
3f6704b8
authored
Feb 25, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added contructor test for Object, adjusted test itself
parent
8878fb91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
ObjectTest.php
tests/unit/framework/base/ObjectTest.php
+11
-3
No files found.
tests/unit/framework/base/ObjectTest.php
View file @
3f6704b8
<?php
namespace
yiiunit\framework\base
;
use
yii\base\Object
;
use
yiiunit\TestCase
;
/**
* ObjectTest
*/
class
ObjectTest
extends
\yiiunit\
TestCase
class
ObjectTest
extends
TestCase
{
/**
* @var NewObject
...
...
@@ -112,10 +114,16 @@ class ObjectTest extends \yiiunit\TestCase
{
$this
->
assertEquals
(
2
,
$this
->
object
->
execute
(
1
));
}
public
function
testConstruct
()
{
$object
=
new
NewObject
(
array
(
'text'
=>
'test text'
));
$this
->
assertEquals
(
'test text'
,
$object
->
getText
());
}
}
class
NewObject
extends
\yii\base\Componen
t
class
NewObject
extends
Objec
t
{
private
$_object
=
null
;
private
$_text
=
'default'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment