Yaffs site version 1.1
[yaffs-website] / vendor / gabordemooij / redbean / testing / RedUNIT / Base / Utf8.php
1 <?php
2
3 namespace RedUNIT\Base;
4
5 use RedUNIT\Base as Base;
6 use RedBeanPHP\Facade as R;
7
8 /**
9  * Utf8
10  *
11  * Tests whether we can store and retrive unicode characters.
12  *
13  * @file    RedUNIT/Base/UTF8.php
14  * @desc    Tests handling of NULL values.
15  * @author  Gabor de Mooij and the RedBeanPHP Community
16  * @license New BSD/GPLv2
17  *
18  * (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community.
19  * This source file is subject to the New BSD/GPLv2 License that is bundled
20  * with this source code in the file license.txt.
21  */
22 class Utf8 extends Base
23 {
24         /**
25          * Test UTF8 handling.
26          *
27          * @return void
28          */
29         public function testUTF8()
30         {
31                 $str = '𠜎ὃ𠻗𠻹𠻺𠼭𠼮𠽌𠾴𠾼𠿪𡁜';
32                 $bean      = R::dispense( 'bean' );
33                 $bean->bla = $str;
34
35                 R::store( $bean );
36                 $bean = R::load( 'bean', $bean->id );
37                 asrt( $bean->bla, $str );
38
39                 pass();
40         }
41 }