Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.www.php > #22207
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| Newsgroups | it.comp.www.php |
| Subject | phpunit e funzioni di wordpress |
| Date | 2018-08-30 11:19 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <pm8crq$qvp$1@gioia.aioe.org> (permalink) |
$ cat AbcTest.php
<?php
class AbcTest extends PHPUnit\Framework\TestCase {
function testAbc() {
$this->assertSame(
'abc',
sanitize_text_field('abc')
);
}
}
$ phpunit AbcTest.php
Error: Call to undefined function sanitize_text_field()
/tmp/tmp.38jeN8ydXK/AbcTest.php:10
Purtroppo ha ragione: sanitize_text_field() è una funzione di wordpress.
C'è quindi un modo per caricare almeno solo le funzioni (il core) di
wordpress?
Back to it.comp.www.php | Previous | Next — Next in thread | Find similar | Unroll thread
phpunit e funzioni di wordpress alex <1j9448a02@lnx159sneakemail.com.invalid> - 2018-08-30 11:19 +0200
Re: phpunit e funzioni di wordpress g4b0 <g4b0@nospam.com> - 2018-08-30 12:29 +0000
Re: phpunit e funzioni di wordpress alex <1j9448a02@lnx159sneakemail.com.invalid> - 2018-08-30 17:12 +0200
Re: phpunit e funzioni di wordpress alex <1j9448a02@lnx159sneakemail.com.invalid> - 2018-08-30 17:34 +0200
csiph-web