Browse Source

Some code style fixes [skip ci]

tags/2.0.0-beta
Luciano Baraglia 11 years ago
parent
commit
cbf649b16c
  1. 28
      extensions/apidoc/templates/offline/views/index.php
  2. 26
      extensions/apidoc/templates/offline/views/offline.php
  3. 24
      tests/unit/extensions/redis/RedisCacheTest.php

28
extensions/apidoc/templates/offline/views/index.php vendored

@ -11,20 +11,22 @@ use yii\apidoc\models\TraitDoc;
?><h1>Class Reference</h1>
<table class="summaryTable docIndex">
<colgroup>
<col class="col-package" />
<col class="col-class" />
<col class="col-description" />
</colgroup>
<tr>
<th>Class</th><th>Description</th>
</tr>
<colgroup>
<col class="col-package" />
<col class="col-class" />
<col class="col-description" />
</colgroup>
<tr>
<th>Class</th>
<th>Description</th>
</tr>
<?php
ksort($types);
foreach($types as $i=>$class): ?>
<tr>
<td><?= $this->context->typeLink($class, $class->name) ?></td>
<td><?= \yii\apidoc\helpers\Markdown::process($class->shortDescription, $class) ?></td>
</tr>
foreach($types as $i=>$class):
?>
<tr>
<td><?= $this->context->typeLink($class, $class->name) ?></td>
<td><?= \yii\apidoc\helpers\Markdown::process($class->shortDescription, $class) ?></td>
</tr>
<?php endforeach; ?>
</table>

26
extensions/apidoc/templates/offline/views/offline.php vendored

@ -19,20 +19,20 @@ $this->beginPage();
<body>
<?php $this->beginBody(); ?>
<div id="apiPage">
<div id="apiPage">
<div id="apiHeader">
<a href="http://www.yiiframework.com">Yii Framework</a> v<?php echo Yii::getVersion(); ?> Class Reference
</div><!-- end of header -->
<div id="apiHeader">
<a href="http://www.yiiframework.com">Yii Framework</a> v<?php echo Yii::getVersion(); ?> Class Reference
</div><!-- end of header -->
<div id="content">
<?php echo $content; ?>
</div><!-- end of content -->
<div id="content">
<?php echo $content; ?>
</div><!-- end of content -->
<div id="apiFooter">
&copy; 2008-2013 by <a href="http://www.yiisoft.com">Yii Software LLC</a><br/>
All Rights Reserved.<br/>
</div><!-- end of footer -->
<div id="apiFooter">
<p>&copy; 2008-2013 by <a href="http://www.yiisoft.com">Yii Software LLC</a></p>
<p>All Rights Reserved.</p>
</div><!-- end of footer -->
<script type="text/javascript">
/*<![CDATA[*/
@ -64,8 +64,8 @@ $("a.sourceLink").click(function(){
/*]]>*/
</script>
</div><!-- end of page -->
</div><!-- end of page -->
<?php $this->endBody(); ?>
</body>
</html>
<?php $this->endPage(); ?>
<?php $this->endPage(); ?>

24
tests/unit/extensions/redis/RedisCacheTest.php

@ -70,32 +70,32 @@ class RedisCacheTest extends CacheTestCase
{
$cache = $this->getCacheInstance();
$data=str_repeat('XX',8192); // http://www.php.net/manual/en/function.fread.php
$key='bigdata1';
$data = str_repeat('XX', 8192); // http://www.php.net/manual/en/function.fread.php
$key = 'bigdata1';
$this->assertFalse($cache->get($key));
$cache->set($key,$data);
$this->assertTrue($cache->get($key)===$data);
$cache->set($key, $data);
$this->assertTrue($cache->get($key) === $data);
// try with multibyte string
$data=str_repeat('ЖЫ',8192); // http://www.php.net/manual/en/function.fread.php
$key='bigdata2';
$data = str_repeat('ЖЫ', 8192); // http://www.php.net/manual/en/function.fread.php
$key = 'bigdata2';
$this->assertFalse($cache->get($key));
$cache->set($key,$data);
$this->assertTrue($cache->get($key)===$data);
$cache->set($key, $data);
$this->assertTrue($cache->get($key) === $data);
}
public function testMultiByteGetAndSet()
{
$cache = $this->getCacheInstance();
$data=['abc'=>'ежик',2=>'def'];
$key='data1';
$data = ['abc' => 'ежик', 2 => 'def'];
$key = 'data1';
$this->assertFalse($cache->get($key));
$cache->set($key,$data);
$this->assertTrue($cache->get($key)===$data);
$cache->set($key, $data);
$this->assertTrue($cache->get($key) === $data);
}
}

Loading…
Cancel
Save