Skip to content

Commit fe95af6

Browse files
author
Davert
committed
changed assert module test
1 parent 7886916 commit fe95af6

41 files changed

Lines changed: 5096 additions & 5097 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎RoboFile.php‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,12 @@ public function buildDocsModules()
203203
return true;
204204
})->processMethod(function(\ReflectionMethod $method, $text) {
205205
$title = "\n### {$method->name}\n";
206-
if (!$text) return $title."__not documented__\n";
206+
if (!trim($text)) return $title."__not documented__\n";
207207
$text = str_replace(array('@since'), array(' * available since version'), $text);
208-
$text = str_replace(array(' @', "\n@"), array(" * ", "\n * "), $text);
208+
$text = str_replace(array("\n @", ' @'), array("\n * ", " * "), $text);
209209
return $title . $text;
210-
})->processMethodSignature(function () {
211-
return "";
212-
})->reorderMethods('ksort')
210+
})->processMethodSignature(false)
211+
->reorderMethods('ksort')
213212
->run();
214213
}
215214
}

‎docs/modules/AMQP.md‎

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -60,55 +60,18 @@ To use this module with Composer you need <em>"videlalvaro/php-amqplib": "*"</em
6060

6161

6262

63-
### pushToExchange
64-
Sends message to exchange
6563

66-
``` php
67-
<?php
68-
$I->pushToExchange('exchange.emails', 'thanks');
69-
$I->pushToExchange('exchange.emails', new AMQPMessage('Thanks!'));
70-
?>
71-
```
7264

73-
* `param` $exchange
74-
* `param` $message string|AMQPMessage
7565

76-
### pushToQueue
77-
Sends message to queue
7866

79-
``` php
80-
<?php
81-
$I->pushToQueue('queue.jobs', 'create user');
82-
$I->pushToQueue('queue.jobs', new AMQPMessage('create'));
83-
?>
84-
```
8567

86-
* `param` $queue
87-
* `param` $message string|AMQPMessage
8868

89-
### seeMessageInQueueContainsText
90-
Checks if message containing text received.
9169

92-
**This method drops message from queue**
93-
**This method will wait for message. If none is sent the script will stuck**.
9470

95-
``` php
96-
<?php
97-
$I->pushToQueue('queue.emails', 'Hello, davert');
98-
$I->seeMessageInQueueContainsText('queue.emails','davert');
99-
?>
100-
```
10171

102-
* `param` $queue
103-
* `param` $text
10472

105-
### grabMessageFromQueue
106-
Takes last message from queue.
10773

108-
$message = $I->grabMessageFromQueue('queue.emails');
10974

110-
* `param` $queue
111-
* `return` AMQPMessage
11275

11376

11477

@@ -132,19 +95,56 @@ $message = $I->grabMessageFromQueue('queue.emails');
13295

13396

13497

98+
### grabMessageFromQueue
99+
Takes last message from queue.
135100

101+
$message = $I->grabMessageFromQueue('queue.emails');
136102

103+
* `param` $queue
104+
* `return` AMQPMessage
137105

138106

139107

108+
### pushToExchange
109+
Sends message to exchange
140110

111+
``` php
112+
<?php
113+
$I->pushToExchange('exchange.emails', 'thanks');
114+
$I->pushToExchange('exchange.emails', new AMQPMessage('Thanks!'));
115+
?>
116+
```
141117

118+
* `param` $exchange
119+
* `param` $message string|AMQPMessage
142120

121+
### pushToQueue
122+
Sends message to queue
143123

124+
``` php
125+
<?php
126+
$I->pushToQueue('queue.jobs', 'create user');
127+
$I->pushToQueue('queue.jobs', new AMQPMessage('create'));
128+
?>
129+
```
144130

131+
* `param` $queue
132+
* `param` $message string|AMQPMessage
145133

146134

135+
### seeMessageInQueueContainsText
136+
Checks if message containing text received.
147137

138+
**This method drops message from queue**
139+
**This method will wait for message. If none is sent the script will stuck**.
148140

141+
``` php
142+
<?php
143+
$I->pushToQueue('queue.emails', 'Hello, davert');
144+
$I->seeMessageInQueueContainsText('queue.emails','davert');
145+
?>
146+
```
149147

148+
* `param` $queue
149+
* `param` $text
150150

‎docs/modules/Asserts.md‎

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -48,46 +48,41 @@ Class Asserts
4848

4949

5050

51+
### dontSeeContains
52+
Checks that haystack doesn't contain needle.
5153

54+
* `param` $needle
55+
* `param` $haystack
56+
* `param` string $message
5257

58+
### dontSeeEmpty
59+
Checks that variable is not empty.
5360

54-
55-
56-
57-
### fail
58-
Fails the test with message.
59-
60-
* `param` $message
61-
62-
### seeEquals
63-
Checks that two variables are equal.
64-
65-
* `param` $expected
6661
* `param` $actual
6762
* `param` string $message
6863

69-
* `return` mixed
70-
7164
### dontSeeEquals
7265
Checks that two variables are not equal
7366

7467
* `param` $expected
7568
* `param` $actual
7669
* `param` string $message
7770

78-
### seeGreaterThen
79-
Checks that expected is greater then actual
71+
### dontSeeNull
72+
Checks that variable is not NULL
8073

81-
* `param` $expected
8274
* `param` $actual
8375
* `param` string $message
8476

85-
### seeGreaterThenOrEqual
86-
Checks that expected is greater or equal then actual
77+
### fail
78+
Fails the test with message.
79+
80+
* `param` $message
81+
82+
83+
84+
8785

88-
* `param` $expected
89-
* `param` $actual
90-
* `param` string $message
9186

9287
### seeContains
9388
Checks that haystack contains needle
@@ -96,33 +91,43 @@ Class Asserts
9691
* `param` $haystack
9792
* `param` string $message
9893

99-
### dontSeeContains
100-
Checks that haystack doesn't contain needle.
94+
### seeEmpty
95+
Checks that variable is empty.
10196

102-
* `param` $needle
103-
* `param` $haystack
97+
* `param` $actual
10498
* `param` string $message
10599

106-
### seeEmpty
107-
Checks that variable is empty.
100+
### seeEquals
101+
Checks that two variables are equal.
108102

103+
* `param` $expected
109104
* `param` $actual
110105
* `param` string $message
111106

112-
### dontSeeEmpty
113-
Checks that variable is not empty.
107+
* `return` mixed
114108

109+
### seeFalse
110+
Checks that condition is negative.
111+
112+
* `param` $condition
113+
* `param` string $message
114+
115+
### seeGreaterThen
116+
Checks that expected is greater then actual
117+
118+
* `param` $expected
115119
* `param` $actual
116120
* `param` string $message
117121

118-
### seeNull
119-
Checks that variable is NULL
122+
### seeGreaterThenOrEqual
123+
Checks that expected is greater or equal then actual
120124

125+
* `param` $expected
121126
* `param` $actual
122127
* `param` string $message
123128

124-
### dontSeeNull
125-
Checks that variable is not NULL
129+
### seeNull
130+
Checks that variable is NULL
126131

127132
* `param` $actual
128133
* `param` string $message
@@ -133,8 +138,3 @@ Class Asserts
133138
* `param` $condition
134139
* `param` string $message
135140

136-
### seeFalse
137-
Checks that condition is negative.
138-
139-
* `param` $condition
140-
* `param` string $message

‎docs/modules/Cli.md‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,12 @@ Wrapper for basic shell commands and shell output
2121

2222

2323

24-
### runShellCommand
25-
Executes a shell command
2624

27-
* `param` $command
2825

29-
### seeInShellOutput
30-
Checks that output from last executed command contains text
3126

32-
* `param` $text
3327

34-
### dontSeeInShellOutput
35-
Checks that output from latest command doesn't contain text
3628

37-
* `param` $text
3829

39-
### seeShellOutputMatches
40-
4130

4231

4332

@@ -64,16 +53,28 @@ Wrapper for basic shell commands and shell output
6453

6554

6655

56+
### dontSeeInShellOutput
57+
Checks that output from latest command doesn't contain text
58+
59+
* `param` $text
6760

6861

6962

7063

7164

7265

66+
### runShellCommand
67+
Executes a shell command
7368

69+
* `param` $command
7470

7571

72+
### seeInShellOutput
73+
Checks that output from last executed command contains text
7674

75+
* `param` $text
7776

77+
### seeShellOutputMatches
78+
__not documented__
7879

7980

0 commit comments

Comments
 (0)