Skip to content

Commit

Permalink
more missing doc block tags added
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Apr 2, 2014
1 parent 44952b0 commit 0d09a54
Show file tree
Hide file tree
Showing 49 changed files with 275 additions and 9 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php
Expand Up @@ -453,6 +453,8 @@ public function testGroupsReadWrite() {

/**
* Test that clearing with repeat writes works properly
*
* @return void
*/
public function testClearingWithRepeatWrites() {
Cache::config('repeat', array(
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
Expand Up @@ -532,6 +532,8 @@ public function testGenerateConstructor() {

/**
* Test generateUses()
*
* @return void
*/
public function testGenerateUses() {
$result = $this->Task->generateUses('model', 'Model', 'Post');
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Console/ConsoleOptionParserTest.php
Expand Up @@ -258,6 +258,7 @@ public function testOptionWithBooleanParam() {
* test parsing options that do not exist.
*
* @expectedException ConsoleException
* @return void
*/
public function testOptionThatDoesNotExist() {
$parser = new ConsoleOptionParser('test', false);
Expand All @@ -270,6 +271,7 @@ public function testOptionThatDoesNotExist() {
* test parsing short options that do not exist.
*
* @expectedException ConsoleException
* @return void
*/
public function testShortOptionThatDoesNotExist() {
$parser = new ConsoleOptionParser('test', false);
Expand Down
4 changes: 4 additions & 0 deletions lib/Cake/Test/Case/Console/ShellTest.php
Expand Up @@ -840,6 +840,8 @@ public function testGetOptionParser() {

/**
* Test file and console and logging
*
* @return void
*/
public function testFileAndConsoleLogging() {
// file logging
Expand Down Expand Up @@ -886,6 +888,8 @@ public function testProtectedUseLogger() {

/**
* Test file and console and logging quiet output
*
* @return void
*/
public function testQuietLog() {
$output = $this->getMock('ConsoleOutput', array(), array(), '', false);
Expand Down
29 changes: 28 additions & 1 deletion lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php
Expand Up @@ -29,6 +29,8 @@ class PhpAclTest extends CakeTestCase {

/**
* Setup
*
* @return void
*/
public function setUp() {
parent::setUp();
Expand All @@ -44,6 +46,8 @@ public function setUp() {

/**
* Test role inheritance
*
* @return void
*/
public function testRoleInheritance() {
$roles = $this->Acl->Aro->roles('User/peter');
Expand All @@ -58,7 +62,9 @@ public function testRoleInheritance() {
}

/**
* Tst adding a role
* Test adding a role
*
* @return void
*/
public function testAddRole() {
$this->assertEquals(array(array(PhpAro::DEFAULT_ROLE)), $this->Acl->Aro->roles('foobar'));
Expand All @@ -68,6 +74,8 @@ public function testAddRole() {

/**
* Test resolving ARO
*
* @return void
*/
public function testAroResolve() {
$this->Acl->Aro->map = array(
Expand All @@ -92,6 +100,8 @@ public function testAroResolve() {

/**
* test correct resolution of defined aliases
*
* @return void
*/
public function testAroAliases() {
$this->Acl->Aro->map = array(
Expand Down Expand Up @@ -193,6 +203,8 @@ public function testCheck() {

/**
* lhs of defined rules are case insensitive
*
* @return void
*/
public function testCheckIsCaseInsensitive() {
$this->assertTrue($this->Acl->check('hardy', 'controllers/forms/new'));
Expand All @@ -203,6 +215,8 @@ public function testCheckIsCaseInsensitive() {

/**
* allow should work in-memory
*
* @return void
*/
public function testAllow() {
$this->assertFalse($this->Acl->check('jeff', 'foo/bar'));
Expand All @@ -223,6 +237,8 @@ public function testAllow() {

/**
* deny should work in-memory
*
* @return void
*/
public function testDeny() {
$this->assertTrue($this->Acl->check('stan', 'controllers/baz/manager_foo'));
Expand All @@ -237,6 +253,8 @@ public function testDeny() {

/**
* test that a deny rule wins over an equally specific allow rule
*
* @return void
*/
public function testDenyRuleIsStrongerThanAllowRule() {
$this->assertFalse($this->Acl->check('peter', 'baz/bam'));
Expand All @@ -261,6 +279,8 @@ public function testDenyRuleIsStrongerThanAllowRule() {

/**
* test that an invalid configuration throws exception
*
* @return void
*/
public function testInvalidConfigWithAroMissing() {
$this->setExpectedException(
Expand All @@ -286,6 +306,8 @@ public function testInvalidConfigWithAcosMissing() {

/**
* test resolving of ACOs
*
* @return void
*/
public function testAcoResolve() {
$this->assertEquals(array('foo', 'bar'), $this->Acl->Aco->resolve('foo/bar'));
Expand All @@ -305,6 +327,8 @@ public function testAcoResolve() {

/**
* test that declaring cyclic dependencies should give an error when building the tree
*
* @return void
*/
public function testAroDeclarationContainsCycles() {
$config = array(
Expand All @@ -328,6 +352,8 @@ public function testAroDeclarationContainsCycles() {

/**
* test that with policy allow, only denies count
*
* @return void
*/
public function testPolicy() {
// allow by default
Expand All @@ -344,4 +370,5 @@ public function testPolicy() {
$this->assertFalse($this->Acl->check('Role/sales', 'controllers/bar/delete'));
$this->assertFalse($this->Acl->check('Role/sales', 'controllers/bar', 'delete'));
}

}
Expand Up @@ -46,13 +46,15 @@ public function setUp() {

/**
* @expectedException PHPUnit_Framework_Error
* @return void
*/
public function testControllerTypeError() {
$this->auth->controller(new StdClass());
}

/**
* @expectedException CakeException
* @return void
*/
public function testControllerErrorOnMissingMethod() {
$this->auth->controller(new Controller());
Expand Down Expand Up @@ -85,4 +87,5 @@ public function testAuthorizeSuccess() {

$this->assertTrue($this->auth->authorize($user, $request));
}

}
Expand Up @@ -594,6 +594,8 @@ public function testReadLegacyCookieValue() {

/**
* Test reading empty values.
*
* @return void
*/
public function testReadEmpty() {
$_COOKIE['CakeTestCookie'] = array(
Expand Down
Expand Up @@ -863,6 +863,8 @@ public function testMessageId() {

/**
* Make sure from/to are not double encoded when UTF-8 is present
*
* @return void
*/
public function testEncodingFrom() {
$this->Controller->EmailTest->to = 'Teßt <test@example.com>';
Expand Down
Expand Up @@ -677,6 +677,7 @@ public function testPaginateOrderVirtualFieldJoinedModel() {
* Tests for missing models
*
* @expectedException MissingModelException
* @return void
*/
public function testPaginateMissingModel() {
$Controller = new PaginatorTestController($this->request);
Expand Down
Expand Up @@ -172,6 +172,7 @@ public function tearDown() {
* visibility keyword in the blackhole callback
*
* @expectedException BadRequestException
* @return void
*/
public function testBlackholeWithBrokenCallback() {
$request = new CakeRequest('posts/index', false);
Expand Down Expand Up @@ -830,7 +831,7 @@ public function testValidatePostFailNoDisabled() {
/**
* Test that validatePost fails when unlocked fields are changed.
*
* @return
* @return void
*/
public function testValidatePostFailDisabledFieldTampering() {
$this->Controller->Security->startup($this->Controller);
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Test/Case/Controller/ScaffoldTest.php
Expand Up @@ -64,6 +64,7 @@ class ScaffoldMockControllerWithFields extends Controller {
* function beforeScaffold
*
* @param string method
* @return boolean true
*/
public function beforeScaffold($method) {
$this->set('scaffoldFields', array('title'));
Expand All @@ -82,7 +83,8 @@ class TestScaffoldMock extends Scaffold {
/**
* Overload _scaffold
*
* @param unknown_type $params
* @param CakeRequest $request
* @return void
*/
protected function _scaffold(CakeRequest $request) {
$this->_params = $request;
Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/Test/Case/Core/AppTest.php
Expand Up @@ -362,6 +362,8 @@ public function testListObjects() {

/**
* Make sure that .svn and friends are excluded from App::objects('plugin')
*
* @return void
*/
public function testListObjectsIgnoreDotDirectories() {
$path = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
Expand Down Expand Up @@ -793,6 +795,7 @@ public function testLoadingVendor() {
* Tests that the automatic class loader will also find in "libs" folder for both
* app and plugins if it does not find the class in other configured paths
*
* @return void
*/
public function testLoadClassInLibs() {
App::build(array(
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Core/ConfigureTest.php
Expand Up @@ -436,6 +436,7 @@ public function testClear() {

/**
* @expectedException ConfigureException
* @return void
*/
public function testDumpNoAdapter() {
Configure::dump(TMP . 'test.php', 'does_not_exist');
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Error/ExceptionRendererTest.php
Expand Up @@ -270,6 +270,8 @@ public function testErrorMethodCoercion() {

/**
* test that helpers in custom CakeErrorController are not lost
*
* @return void
*/
public function testCakeErrorHelpersNotLost() {
$testApp = CAKE . 'Test' . DS . 'test_app' . DS;
Expand Down
20 changes: 20 additions & 0 deletions lib/Cake/Test/Case/Log/CakeLogTest.php
Expand Up @@ -260,6 +260,7 @@ public function testSelectiveLoggingByLevel() {
* test enable
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamEnable() {
CakeLog::config('spam', array(
Expand All @@ -275,6 +276,7 @@ public function testStreamEnable() {
* test disable
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamDisable() {
CakeLog::config('spam', array(
Expand All @@ -292,6 +294,7 @@ public function testStreamDisable() {
* test enabled() invalid stream
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamEnabledInvalid() {
CakeLog::enabled('bogus_stream');
Expand All @@ -301,11 +304,17 @@ public function testStreamEnabledInvalid() {
* test disable invalid stream
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamDisableInvalid() {
CakeLog::disable('bogus_stream');
}

/**
* resets log config
*
* @return void
*/
protected function _resetLogConfig() {
CakeLog::config('debug', array(
'engine' => 'File',
Expand All @@ -319,6 +328,11 @@ protected function _resetLogConfig() {
));
}

/**
* delete logs
*
* @return void
*/
protected function _deleteLogs() {
if (file_exists(LOGS . 'shops.log')) {
unlink(LOGS . 'shops.log');
Expand Down Expand Up @@ -568,6 +582,8 @@ public function testConvenienceScopedLogging() {

/**
* test convenience methods
*
* @return void
*/
public function testConvenienceMethods() {
$this->_deleteLogs();
Expand Down Expand Up @@ -642,6 +658,8 @@ public function testConvenienceMethods() {

/**
* test levels customization
*
* @return void
*/
public function testLevelCustomization() {
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Log level tests not supported on Windows.');
Expand Down Expand Up @@ -672,6 +690,8 @@ public function testLevelCustomization() {

/**
* Test writing log files with custom levels
*
* @return void
*/
public function testCustomLevelWrites() {
$this->_deleteLogs();
Expand Down

0 comments on commit 0d09a54

Please sign in to comment.