Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
b163e443
Commit
b163e443
authored
Dec 10, 2017
by
Gabriel Caruso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring tests
parent
c62cfba1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
tests/Silex/Tests/ApplicationTest.php
tests/Silex/Tests/ApplicationTest.php
+3
-3
tests/Silex/Tests/ControllerCollectionTest.php
tests/Silex/Tests/ControllerCollectionTest.php
+2
-2
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
+1
-1
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
+2
-2
tests/Silex/Tests/StreamTest.php
tests/Silex/Tests/StreamTest.php
+1
-1
No files found.
tests/Silex/Tests/ApplicationTest.php
View file @
b163e443
...
...
@@ -88,7 +88,7 @@ class ApplicationTest extends TestCase
$routes
=
$app
[
'routes'
];
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\RouteCollection'
,
$routes
);
$this
->
assert
Equals
(
0
,
count
(
$routes
->
all
()
));
$this
->
assert
Count
(
0
,
$routes
->
all
(
));
}
public
function
testGetRoutesWithRoutes
()
...
...
@@ -105,9 +105,9 @@ class ApplicationTest extends TestCase
$routes
=
$app
[
'routes'
];
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\RouteCollection'
,
$routes
);
$this
->
assert
Equals
(
0
,
count
(
$routes
->
all
()
));
$this
->
assert
Count
(
0
,
$routes
->
all
(
));
$app
->
flush
();
$this
->
assert
Equals
(
2
,
count
(
$routes
->
all
()
));
$this
->
assert
Count
(
2
,
$routes
->
all
(
));
}
public
function
testOnCoreController
()
...
...
tests/Silex/Tests/ControllerCollectionTest.php
View file @
b163e443
...
...
@@ -30,7 +30,7 @@ class ControllerCollectionTest extends TestCase
{
$controllers
=
new
ControllerCollection
(
new
Route
());
$routes
=
$controllers
->
flush
();
$this
->
assert
Equals
(
0
,
count
(
$routes
->
all
()
));
$this
->
assert
Count
(
0
,
$routes
->
all
(
));
}
public
function
testGetRouteCollectionWithRoutes
()
...
...
@@ -40,7 +40,7 @@ class ControllerCollectionTest extends TestCase
$controllers
->
match
(
'/bar'
,
function
()
{});
$routes
=
$controllers
->
flush
();
$this
->
assert
Equals
(
2
,
count
(
$routes
->
all
()
));
$this
->
assert
Count
(
2
,
$routes
->
all
(
));
}
public
function
testControllerFreezing
()
...
...
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
View file @
b163e443
...
...
@@ -88,7 +88,7 @@ class DoctrineServiceProviderTest extends TestCase
}
$app
=
new
Application
();
$this
->
assert
True
(
isset
(
$app
[
'logger'
])
);
$this
->
assert
ArrayHasKey
(
'logger'
,
$app
);
$this
->
assertNull
(
$app
[
'logger'
]);
$app
->
register
(
new
DoctrineServiceProvider
(),
array
(
'dbs.options'
=>
array
(
...
...
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
View file @
b163e443
...
...
@@ -110,8 +110,8 @@ class ValidatorServiceProviderTest extends TestCase
$form
->
submit
(
array
(
'email'
=>
$email
));
$this
->
assertEquals
(
$isValid
,
$form
->
isValid
());
$this
->
assert
Equals
(
$nbGlobalError
,
count
(
$form
->
getErrors
()
));
$this
->
assert
Equals
(
$nbEmailError
,
count
(
$form
->
offsetGet
(
'email'
)
->
getErrors
()
));
$this
->
assert
Count
(
$nbGlobalError
,
$form
->
getErrors
(
));
$this
->
assert
Count
(
$nbEmailError
,
$form
->
offsetGet
(
'email'
)
->
getErrors
(
));
}
public
function
testValidatorWillNotAddNonexistentTranslationFiles
()
...
...
tests/Silex/Tests/StreamTest.php
View file @
b163e443
...
...
@@ -28,7 +28,7 @@ class StreamTest extends TestCase
$response
=
$app
->
stream
();
$this
->
assertInstanceOf
(
'Symfony\Component\HttpFoundation\StreamedResponse'
,
$response
);
$this
->
assert
Same
(
false
,
$response
->
getContent
());
$this
->
assert
False
(
$response
->
getContent
());
}
public
function
testStreamActuallyStreams
()
...
...
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