Exemple #1
0
 public function test302RedirectWithLocation()
 {
     $response = new Response(302, '', ['Location' => 'url.com']);
     assertThat($this->readAttribute($response, 'status'), is(302));
     assertThat($this->readAttribute($response, 'body'), is(emptyString()));
     assertThat($this->readAttribute($response, 'headers'), is(equalTo(['Location' => 'url.com'])));
 }
 public function testEmptyHasAReadableDescription()
 {
     $this->assertDescription('an empty string', emptyString());
 }
 /**
  * It returns an array with the event and object info
  *
  * @param $transition   String  The current event performed
  * @return array
  */
 private function getLogInfoArray($transition)
 {
     $to = emptyString($transition) ? $transition : $this->config['transitions'][$transition];
     $infoArray = ['from_status' => $this->getState(), 'to_status' => $to, 'transition_name' => $transition, 'graph' => $this->getGraph(), 'event' => 'transition', 'component' => 'state machine'];
     return LoggerHelper::addObjectInfo($infoArray, $this->object);
 }
 public function testWhenLogIsClearedThenFileShouldBeEmpty()
 {
     file_put_contents($this->testLog, 'irrelevant existing content');
     clearLog($this->testLog);
     $this->assertLogContains(emptyString());
 }
 private function tokenShouldBeValid()
 {
     assertThat($this->cache->isExpired(), is(false));
     assertThat($this->cache->getAccessToken()->token, not(emptyString()));
 }
Exemple #6
0
			<th>Posted</th>
		</tr>
	</thead>
	<tbody>
                <?php 
    ?>
        
		<?php 
    foreach ($result as $record) {
        ?>
		<tr>
			<td><a href="?route=/application/schnippets&m=get&id=<?php 
        echo $record->getMember('id');
        ?>
"><?php 
        echo emptyString($record->getMember('title'));
        ?>
</a></td>
			<td><?php 
        echo $record->getMember('lang');
        ?>
</td>
			<td><?php 
        $usr = $user->get_user($record->getMember('user'));
        echo "{$usr['fname']} {$usr['lname']}";
        ?>
</td>
			<td><?php 
        echo date('m/d/Y', $record->getMember('time'));
        ?>
</td>
Exemple #7
0
 /** @dataProvider provideTools */
 public function testNoOptionWhenNothingIsIgnored($tool)
 {
     assertThat($this->ignore($tool, '', ' '), is(emptyString()));
 }
 /**
  * @test
  */
 public function replace_EmptyString_ReturnsEmptyString()
 {
     $result = $this->replacer->replace('');
     assertThat($result, is(emptyString()));
 }